Correction of possible problems

Signed-off-by: Valentin Popov <info@valentineus.link>
This commit is contained in:
2018-11-02 02:06:47 +04:00
parent 849d7126d8
commit 2f04aeab6d
3 changed files with 4 additions and 4 deletions

View File

@ -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();