From af6ac9fb22deae77148ae82663131ae3b1d251a6 Mon Sep 17 00:00:00 2001 From: Valentin Popov Date: Fri, 27 Oct 2017 08:04:23 +0400 Subject: A small correction of logic --- classes/events.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'classes') diff --git a/classes/events.php b/classes/events.php index 9be880f..419ad50 100644 --- a/classes/events.php +++ b/classes/events.php @@ -77,13 +77,14 @@ class events { * @param object $callback */ private static function handler_callback($data, $callback) { - if ($callback->enable) { + if (boolval($callback->enable)) { + $events = array(); if (!empty($callback->events)) { $events = unserialize(gzuncompress(base64_decode($callback->events))); } if (!empty($events[$data["eventname"]])) { - if (boolval($callback->token)) { + if (!empty($callback->token)) { $data["token"] = $callback->token; } -- cgit v1.2.3