diff options
Diffstat (limited to 'lib/classes/NotificationCenter.class.php')
| -rw-r--r-- | lib/classes/NotificationCenter.class.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/classes/NotificationCenter.class.php b/lib/classes/NotificationCenter.class.php index dce878e..aaaa9e8 100644 --- a/lib/classes/NotificationCenter.class.php +++ b/lib/classes/NotificationCenter.class.php @@ -57,6 +57,8 @@ class NotificationCenter $event = ''; } + $predicate = null; + if ($object) { $predicate = is_callable($object) ? $object @@ -65,9 +67,10 @@ class NotificationCenter }; } - self::$observers[$event][] = - ['predicate' => $predicate ?: NULL, - 'observer' => [$observer, $method]]; + self::$observers[$event][] = [ + 'predicate' => $predicate, + 'observer' => [$observer, $method] + ]; } /** |
