create controller via Zend\Mvc\Controller\ControllerManager #3085

merged 1 commit into from Feb 15, 2013


None yet
2 participants

weierophinney commented Feb 13, 2013

when create controller via Zend\Mvc\Controller\ControllerManager,
ControllerManager injecting into public PluginManager new controller instance.
If I have another controller (early createt), and try to use plugin, such as params() - this plugin is linked to second controller, and not work correctly.

workarround :

class AbstractActionController extends \Zend\Mvc\Controller\AbstractActionController {
    public function getPluginManager() {
        return parent::getPluginManager()->setController($this);

@ghost ghost assigned weierophinney Feb 13, 2013


weierophinney commented Feb 13, 2013

I've verified the issue, and am working on a fix.

[#3085] Ensure controller is current in plugin manager
- When fetching the plugin manager, inject the current controller
  *always*; this ensures that if a plugin is retrieved, it receives the
  controller that actually requested it.

@ralphschindler ralphschindler merged commit bb2e97b into zendframework:master Feb 15, 2013

1 check passed

default The Travis build passed

ralphschindler added a commit that referenced this pull request Feb 15, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment