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'); + } } /**