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:
-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])) {