MDL-58432 core_calendar: allow event properties to be null

Part of MDL-55611 epic.
This commit is contained in:
Mark Nelson 2017-03-29 17:19:51 +08:00 committed by Dan Poltawski
parent e1cd93ce20
commit 2a8e41b990

View file

@ -279,7 +279,7 @@ class calendar_event {
if (method_exists($this, 'get_'.$key)) {
return $this->{'get_'.$key}();
}
if (!isset($this->properties->{$key})) {
if (!property_exists($this->properties, $key)) {
throw new \coding_exception('Undefined property requested');
}
return $this->properties->{$key};