Zend Framework

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

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.8.0
  • Fix Version/s: 1.8.1
  • Component/s: Zend_Controller
  • Labels:
    None

Description

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(); }else{ $dispatcher = null; }

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

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

Activity

There are no comments yet on this issue.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: