summaryrefslogtreecommitdiff
path: root/editservice.php
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2017-10-26 08:21:52 +0300
committerValentin Popov <info@valentineus.link>2017-10-26 08:21:52 +0300
commite86542d8f786771c6713a15fb845987c9aebbfac (patch)
treed59bdbdccd6db5f32c279b6f2e55fa42ee4368be /editservice.php
parentdab55b9562d9fd8baea6cd3e08ef317a158b67da (diff)
downloadlocal_webhooks-e86542d8f786771c6713a15fb845987c9aebbfac.tar.xz
local_webhooks-e86542d8f786771c6713a15fb845987c9aebbfac.zip
Fix for errors with empty values
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;