Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattab <matthieu.aubry@gmail.com>2014-10-08 04:04:59 +0400
committermattab <matthieu.aubry@gmail.com>2014-10-08 04:04:59 +0400
commite3fbd6da3f7291d63b1124a85cbcca247efd34df (patch)
treec7c8906d6e6c869abc04296a6171c4ca132f6435 /core/EventDispatcher.php
parent7afc48204e1a0700080dd37b1c5910d5657cd190 (diff)
Fix one unit test
Diffstat (limited to 'core/EventDispatcher.php')
-rw-r--r--core/EventDispatcher.php5
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])) {