ZF-2887: Zend_Controller triggers Notice:
Description
Index: I:/xampp/php/PEAR/Zend15/library/Zend/Controller/Dispatcher/Standard.php
When there is not default module directory, it triggers a Notice:
Notice: Undefined index: default in I:\xampp\php\PEAR\Zend15\library\Zend\Controller\Dispatcher\Standard.php on line 383
It should raise an exception:
Index: I:/xampp/php/PEAR/Zend15/library/Zend/Controller/Dispatcher/Standard.php
===================================================================
--- I:/xampp/php/PEAR/Zend15/library/Zend/Controller/Dispatcher/Standard.php (revision 8831)
+++ I:/xampp/php/PEAR/Zend15/library/Zend/Controller/Dispatcher/Standard.php (working copy)
@@ -380,6 +380,10 @@
$controllerDirs = $this->getControllerDirectory();
$this->_curModule = $this->_defaultModule;
+ if (!in_array($this->_defaultModule, $controllerDirs)) {
+ throw new Zend_Controller_Exception('Default module \'' . $this->_defaultModule . '\' was not found in controller directory.');
+ }
+
$this->_curDirectory = $controllerDirs[$this->_defaultModule];
$module = $request->getModuleName();
if ($this->isValidModule($module)) {
EDIT: no, this solution is wrong, but it should be handled somehow.
Comments
Posted by julien PAULI (doctorrock83) on 2008-03-16T08:01:08.000+0000
Please, see http://framework.zend.com/issues/browse/ZF-2609.
Posted by Matthew Weier O'Phinney (matthew) on 2008-03-16T08:19:28.000+0000
Scheduling for 1.5.1. This issue will only affect a small number of users, and the obvious solution until a "fix" is provided is to define a 'default' module, or to tell the dispatcher which module should be considered the default.
Posted by Matthew Weier O'Phinney (matthew) on 2008-03-21T15:49:51.000+0000
Fixed in trunk and 1.5 release branch
Posted by Wil Sinclair (wil) on 2008-03-21T17:34:14.000+0000
I'm assuming this fix is merged to the 1.5 release branch for release with 1.5.1. Please update JIRA if this is not the case.