From 2f04aeab6d7b899a661763e20fdd2e58e635b74d Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Fri, 2 Nov 2018 02:06:47 +0400 Subject: Correction of possible problems Signed-off-by: Valentin Popov --- editservice.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'editservice.php') diff --git a/editservice.php b/editservice.php index de99556..aa3efb8 100644 --- a/editservice.php +++ b/editservice.php @@ -50,7 +50,7 @@ if ($mform->is_cancelled()) { /* Getting the data */ $servicerecord = new stdClass(); -if ($editing = (bool) $serviceid) { +if (($editing = (bool) $serviceid) === true) { $servicerecord = local_webhooks_get_record($serviceid); if (is_array($servicerecord->events)) { @@ -69,7 +69,7 @@ if ($editing = (bool) $serviceid) { } /* Processing of received data */ -if ($data = $mform->get_data()) { +if (!empty($data = $mform->get_data())) { if (is_array($data->events)) { $events = array(); -- cgit v1.2.3