ZF-6579: Zend_Controller_Router_Route_Module::getInstance() doesnt add dispatcher and request to the route.

Issue Type: Bug Created: 2009-05-08T10:11:47.000+0000 Last Updated: 2009-05-09T08:41:51.000+0000 Status: Resolved Fix version(s): - 1.8.1 (12/May/09)

Reporter: Mathieu Delisle (m4d3l) Assignee: Ben Scholzen (dasprid) Tags: - Zend_Controller

Related issues: Attachments:


After try to set a new default route with chaining in the configuration file, after discussion with DASPRiD, He found that the getInstance() doesnt add the dispatcher.

Here is what I add in the method to get it work.

public static function getInstance(Zend_Config $config) { $defs = ($config->defaults instanceof Zend_Config) ? $config->defaults->toArray() : array();

    if (isset($config->dispatcher) and $config->dispatcher == true){
        $dispatcher = Zend_Controller_Front::getInstance()->getDispatcher();
        $dispatcher = null;

    if (isset($config->request) and $config->request == true){
        $request = Zend_Controller_Front::getInstance()->getRequest();
        $request = null;

    return new self($defs, $dispatcher, $request);


No comments to display

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.