aboutsummaryrefslogtreecommitdiff
path: root/classes/forms.php
diff options
context:
space:
mode:
Diffstat (limited to 'classes/forms.php')
-rw-r--r--classes/forms.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/classes/forms.php b/classes/forms.php
index 2e38e70..5e75050 100644
--- a/classes/forms.php
+++ b/classes/forms.php
@@ -52,7 +52,10 @@ class service_edit_form extends moodleform {
* @param object $record
*/
public function set_data($record) {
- $record->events = unserialize(gzuncompress(base64_decode($record->events)));
+ if (!empty($record->events)) {
+ $record->events = unserialize(gzuncompress(base64_decode($record->events)));
+ }
+
return parent::set_data($record);
}