Check event handler exists before calling it, in case the cache is out of date. Fixes #442

This commit is contained in:
Shish 2014-08-24 11:33:05 +01:00
parent b1d634a8de
commit f873d2304d

View file

@ -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++;