summaryrefslogtreecommitdiff
path: root/editservice.php
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2018-11-02 01:06:47 +0300
committerValentin Popov <info@valentineus.link>2018-11-02 01:06:47 +0300
commit2f04aeab6d7b899a661763e20fdd2e58e635b74d (patch)
tree3db07ee034b353b38df6cc713a7b4007d2a22301 /editservice.php
parent849d7126d8674faac056b941038f5fd59811e34f (diff)
downloadlocal_webhooks-2f04aeab6d7b899a661763e20fdd2e58e635b74d.tar.xz
local_webhooks-2f04aeab6d7b899a661763e20fdd2e58e635b74d.zip
Correction of possible problems
Signed-off-by: Valentin Popov <info@valentineus.link>
Diffstat (limited to 'editservice.php')
-rw-r--r--editservice.php4
1 files changed, 2 insertions, 2 deletions
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();