summaryrefslogtreecommitdiff
path: root/classes/events.php
diff options
context:
space:
mode:
authorValentin Popov <info@valentineus.link>2017-10-27 07:04:23 +0300
committerValentin Popov <info@valentineus.link>2017-10-27 07:04:23 +0300
commitaf6ac9fb22deae77148ae82663131ae3b1d251a6 (patch)
tree16a511cdf94ad0c5a0a8a31365adc9cfc6cd8d80 /classes/events.php
parente1734746c047c9df1975cd548d32d87019923728 (diff)
downloadlocal_webhooks-af6ac9fb22deae77148ae82663131ae3b1d251a6.tar.xz
local_webhooks-af6ac9fb22deae77148ae82663131ae3b1d251a6.zip
A small correction of logic
Diffstat (limited to 'classes/events.php')
-rw-r--r--classes/events.php5
1 files changed, 3 insertions, 2 deletions
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;
}