From 0f09da42e95e23ec5768b0dc2a6c8ee244375da6 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Thu, 19 Dec 2019 20:11:25 +0100 Subject: [PATCH] handle uninit dispatcher --- Module/ModuleManager.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Module/ModuleManager.php b/Module/ModuleManager.php index f8278506f..a9bb4dc5d 100644 --- a/Module/ModuleManager.php +++ b/Module/ModuleManager.php @@ -694,7 +694,9 @@ final class ModuleManager $name = $this->generateModuleName($module); $this->running[$name] = $this->getModuleInstance($module); - $this->app->dispatcher->set($this->running[$name], '\Modules\\Controller\\' . $module . '\\' . $this->app->appName . 'Controller'); + if ($this->app->dispatcher !== null) { + $this->app->dispatcher->set($this->running[$name], '\Modules\\Controller\\' . $module . '\\' . $this->app->appName . 'Controller'); + } } /**