Zend Framework

Zend_Controller triggers Notice:

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.5.0RC1, 1.5.0
  • Fix Version/s: 1.5.1
  • Component/s: Zend_Controller
  • Labels:
    None
  • Fix Version Priority:
    Should Have

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.

Issue Links

Activity

Hide
julien PAULI added a comment -
Show
julien PAULI added a comment - Please, see http://framework.zend.com/issues/browse/ZF-2609.
Hide
Matthew Weier O'Phinney added a comment -

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.

Show
Matthew Weier O'Phinney added a comment - 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.
Hide
Matthew Weier O'Phinney added a comment -

Fixed in trunk and 1.5 release branch

Show
Matthew Weier O'Phinney added a comment - Fixed in trunk and 1.5 release branch
Hide
Wil Sinclair added a comment -

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.

Show
Wil Sinclair added a comment - 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.

People

Vote (0)
Watch (2)

Dates

  • Due:
    Created:
    Updated:
    Resolved: