Permalink
Browse files

The reason for the clone is so that each controller gets it's own plu…

…gin broker. In the case where the Forward plugin is being used, a shared plugin broker would get it's internal controller variable overwritten by each Forward.
  • Loading branch information...
1 parent d0c093a commit 3888957d50bcf41b988fd7b4c0631f95089563ab @SocalNick SocalNick committed with May 23, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 library/Zend/Mvc/Service/ControllerLoaderFactory.php
@@ -89,7 +89,7 @@ public function createService(ServiceLocatorInterface $serviceLocator)
$controllerLoader->addInitializer(function ($instance) use ($serviceLocator) {
if ($instance instanceof Pluggable) {
- $instance->setBroker($serviceLocator->get('ControllerPluginBroker'));
+ $instance->setBroker(clone $serviceLocator->get('ControllerPluginBroker'));
}
});

0 comments on commit 3888957

Please sign in to comment.