ZF-2149: isValidModule() in Zend_Controller_Dispatcher_Standard does not check if $module is a string


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...


Scheduling for 1.0.3

Attached a patch that fixes the bug.

Good catch. Fixed in revision 7386. Thanks, Daniele.