diff options
author | mattab <matthieu.aubry@gmail.com> | 2014-10-08 04:04:59 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2014-10-08 04:04:59 +0400 |
commit | e3fbd6da3f7291d63b1124a85cbcca247efd34df (patch) | |
tree | c7c8906d6e6c869abc04296a6171c4ca132f6435 /core/EventDispatcher.php | |
parent | 7afc48204e1a0700080dd37b1c5910d5657cd190 (diff) |
Fix one unit test
Diffstat (limited to 'core/EventDispatcher.php')
-rw-r--r-- | core/EventDispatcher.php | 5 |
1 files changed, 5 insertions, 0 deletions
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])) { |