diff options
author | Valentin Popov <info@valentineus.link> | 2017-10-26 08:21:52 +0300 |
---|---|---|
committer | Valentin Popov <info@valentineus.link> | 2017-10-26 08:21:52 +0300 |
commit | e86542d8f786771c6713a15fb845987c9aebbfac (patch) | |
tree | d59bdbdccd6db5f32c279b6f2e55fa42ee4368be | |
parent | dab55b9562d9fd8baea6cd3e08ef317a158b67da (diff) | |
download | local_webhooks-e86542d8f786771c6713a15fb845987c9aebbfac.tar.xz local_webhooks-e86542d8f786771c6713a15fb845987c9aebbfac.zip |
Fix for errors with empty values
-rw-r--r-- | editservice.php | 4 |
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; |