Bug in Zend\ModuleManager\Listener\LocatorRegistrationListener #2350

Closed
wants to merge 4 commits into
from
@@ -66,6 +66,10 @@ public function onLoadModulesPost(Event $e)
$moduleManager = $e->getTarget();
$events = $moduleManager->getEventManager()->getSharedManager();
+ if(!$events){
+ return;
+ }
+
// Shared instance for module manager
$events->attach('Zend\Mvc\Application', 'bootstrap', function ($e) use ($moduleManager) {
$moduleClassName = get_class($moduleManager);