aboutsummaryrefslogtreecommitdiff
path: root/editservice.php
diff options
context:
space:
mode:
Diffstat (limited to 'editservice.php')
-rw-r--r--editservice.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/editservice.php b/editservice.php
index 427332c..7ed7468 100644
--- a/editservice.php
+++ b/editservice.php
@@ -64,7 +64,9 @@ if ($data = $mform->get_data()) {
}
/* Packing of data */
- $data->events = base64_encode(gzcompress(serialize($data->events), 9));
+ if (!empty($data->events)) {
+ $data->events = base64_encode(gzcompress(serialize($data->events), 9));
+ }
if ($idediting) {
$data->id = $idservice;