diff --git a/lib/classes/event/calendar_event_created.php b/lib/classes/event/calendar_event_created.php index 399b943aae1..28c47a07e71 100644 --- a/lib/classes/event/calendar_event_created.php +++ b/lib/classes/event/calendar_event_created.php @@ -107,7 +107,7 @@ class calendar_event_created extends base { if (empty($this->other['name'])) { throw new \coding_exception('The \'name\' value must be set in other.'); } - if (empty($this->other['timestart'])) { + if (!isset($this->other['timestart'])) { throw new \coding_exception('The \'timestart\' value must be set in other.'); } } diff --git a/lib/classes/event/calendar_event_deleted.php b/lib/classes/event/calendar_event_deleted.php index 4de8aa04a11..933f0b075dc 100644 --- a/lib/classes/event/calendar_event_deleted.php +++ b/lib/classes/event/calendar_event_deleted.php @@ -88,7 +88,7 @@ class calendar_event_deleted extends base { if (empty($this->other['name'])) { throw new \coding_exception('The \'name\' value must be set in other.'); } - if (empty($this->other['timestart'])) { + if (!isset($this->other['timestart'])) { throw new \coding_exception('The \'timestart\' value must be set in other.'); } }