From e86542d8f786771c6713a15fb845987c9aebbfac Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Thu, 26 Oct 2017 09:21:52 +0400 Subject: Fix for errors with empty values --- editservice.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- cgit v1.2.3