Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.8.0
-
Fix Version/s: 1.8.1
-
Component/s: Zend_Controller
-
Labels:None
-
Tags:
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);
}