ZF-2149: isValidModule() in Zend_Controller_Dispatcher_Standard does not check if $module is a string
Description
The method isValidmodule() in Zend_Controller_Dispatcher_Standard tries to check if $module is present in the $controllerDir array, but misses to check if the submitted value is a string.
This causes a PHP warning to be displayed if, for example, in a controller class you use the _forward method and omit (mistakenly) the module name, but add as 3rd parameter an array: $this->_forward('index','index',array('testvalue1','testvalue2'))
The warning is the following: Warning: Illegal offset type in isset or empty in /home/www/files/Zend/Controller/Dispatcher/Standard.php...
Comments
Posted by Matthew Weier O'Phinney (matthew) on 2007-11-16T14:51:04.000+0000
Scheduling for 1.0.3
Posted by Jordan Ryan Moore (jordanryanmoore) on 2007-12-13T15:27:47.000+0000
Attached a patch that fixes the bug.
Posted by Michal Minicki (martel) on 2008-01-11T06:48:36.000+0000
Good catch. Fixed in revision 7386. Thanks, Daniele.