diff options
author | Valentin Popov <info@valentineus.link> | 2018-03-20 03:42:44 +0300 |
---|---|---|
committer | Valentin Popov <info@valentineus.link> | 2018-03-20 03:42:44 +0300 |
commit | d7185f59256e4ebf7a311d40b563c60193ff59be (patch) | |
tree | 8f4f9f4fef2583b8fac2a95d204c1ce082d34c6a /lib.php | |
parent | 975c6f8d201b0de723fc693514512e3acd749499 (diff) | |
download | local_webhooks-d7185f59256e4ebf7a311d40b563c60193ff59be.tar.xz local_webhooks-d7185f59256e4ebf7a311d40b563c60193ff59be.zip |
Minor bug fixed
Signed-off-by: Valentin Popov <info@valentineus.link>
Diffstat (limited to 'lib.php')
-rw-r--r-- | lib.php | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -114,7 +114,9 @@ function local_webhooks_get_record($serviceid) { $record = $DB->get_record(LOCAL_WEBHOOKS_TABLE_SERVICES, array("id" => $serviceid), "*", IGNORE_MISSING); /* Loads service events */ - $record->events = local_webhooks_get_list_events_for_service($serviceid); + if (!empty($record)) { + $record->events = local_webhooks_get_list_events_for_service($serviceid); + } return $record; } |