Minor bug fixed

Signed-off-by: Valentin Popov <info@valentineus.link>
This commit is contained in:
Valentin Popov 2018-03-20 04:42:44 +04:00
parent 975c6f8d20
commit d7185f5925
Signed by: Valentin Popov
GPG Key ID: 269A00ACA90A8EA3

View File

@ -114,7 +114,9 @@ function local_webhooks_get_record($serviceid) {
$record = $DB->get_record(LOCAL_WEBHOOKS_TABLE_SERVICES, array("id" => $serviceid), "*", IGNORE_MISSING); $record = $DB->get_record(LOCAL_WEBHOOKS_TABLE_SERVICES, array("id" => $serviceid), "*", IGNORE_MISSING);
/* Loads service events */ /* 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; return $record;
} }