Commit b93da288 authored by Evan Goldenberg's avatar Evan Goldenberg
Browse files

use empty() for checking if start/stop dates are present


Signed-off-by: default avatarEvan Goldenberg <evang@catalyst.net.nz>
parent 91300f6d
......@@ -346,10 +346,10 @@ function editaccess_submit(Pieform $form, $values) {
if ($values['accesslist']) {
$dateformat = get_string('strftimedatetimeshort');
foreach ($values['accesslist'] as &$item) {
if ($item['startdate']) {
if (!empty($item['startdate'])) {
$item['startdate'] = ptimetotime(strptime($item['startdate'], $dateformat));
}
if ($item['stopdate']) {
if (!empty($item['stopdate'])) {
$item['stopdate'] = ptimetotime(strptime($item['stopdate'], $dateformat));
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment