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);
|
||||
foreach($my_event_listeners as $listener) {
|
||||
ctx_log_start(get_class($listener));
|
||||
$listener->$method_name($event);
|
||||
if(method_exists($listener, $method_name)) {
|
||||
$listener->$method_name($event);
|
||||
}
|
||||
ctx_log_endok();
|
||||
}
|
||||
$_event_count++;
|
||||
|
|
Reference in a new issue