Check event handler exists before calling it, in case the cache is out of date. Fixes #442
This commit is contained in:
parent
b1d634a8de
commit
f873d2304d
1 changed files with 3 additions and 1 deletions
|
@ -1308,7 +1308,9 @@ function send_event(Event $event) {
|
||||||
ksort($my_event_listeners);
|
ksort($my_event_listeners);
|
||||||
foreach($my_event_listeners as $listener) {
|
foreach($my_event_listeners as $listener) {
|
||||||
ctx_log_start(get_class($listener));
|
ctx_log_start(get_class($listener));
|
||||||
|
if(method_exists($listener, $method_name)) {
|
||||||
$listener->$method_name($event);
|
$listener->$method_name($event);
|
||||||
|
}
|
||||||
ctx_log_endok();
|
ctx_log_endok();
|
||||||
}
|
}
|
||||||
$_event_count++;
|
$_event_count++;
|
||||||
|
|
Reference in a new issue