From e3fbd6da3f7291d63b1124a85cbcca247efd34df Mon Sep 17 00:00:00 2001 From: mattab Date: Wed, 8 Oct 2014 13:04:59 +1300 Subject: Fix one unit test --- core/EventDispatcher.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'core/EventDispatcher.php') diff --git a/core/EventDispatcher.php b/core/EventDispatcher.php index d343da8beb..bdec8c1c7c 100644 --- a/core/EventDispatcher.php +++ b/core/EventDispatcher.php @@ -90,6 +90,11 @@ class EventDispatcher extends Singleton $plugin = $this->getPluginManager()->getLoadedPlugin($plugin); } + if (empty($plugin)) { + return; // may happen in unit tests + } + + $hooks = $plugin->getListHooksRegistered(); if (isset($hooks[$eventName])) { -- cgit v1.2.3