Skip to content

Commit

Permalink
MDL-47174 events: new calendar event may have 0 timestart
Browse files Browse the repository at this point in the history
  • Loading branch information
marinaglancy committed Nov 6, 2014
1 parent 6ce4b8e commit 8f94164
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/classes/event/calendar_event_created.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ protected function validate_data() {
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.');
}
}
Expand Down
2 changes: 1 addition & 1 deletion lib/classes/event/calendar_event_deleted.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ protected function validate_data() {
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.');
}
}
Expand Down

0 comments on commit 8f94164

Please sign in to comment.