diff --git a/libraries/joomla/event/dispatcher.php b/libraries/joomla/event/dispatcher.php index f64108a192..39e3220054 100644 --- a/libraries/joomla/event/dispatcher.php +++ b/libraries/joomla/event/dispatcher.php @@ -97,8 +97,8 @@ public function getState() */ public function register($event, $handler) { - // Are we dealing with a class or function type handler? - if (function_exists($handler)) + // Are we dealing with a class or callback type handler? + if (is_callable($handler)) { // Ok, function type event handler... let's attach it. $method = array('event' => $event, 'handler' => $handler);