ZF-6268: Zend_Controller_Dispatcher_Standard raises notice if modules added via the "addModuleDirectory" method have upper case first letters in their directory names

Issue Type: Bug Created: 2009-04-10T16:39:32.000+0000 Last Updated: 2012-11-20T20:53:02.000+0000 Status: Closed Fix version(s): Reporter: Carlos Lage (carloslage) Assignee: None Tags: - Zend_Controller

Related issues: Attachments:


For example, in the directory that contains my Modules, they're all named with an upper case first letter, let's say its list is: Core Test

If I try to go to, it correctly routes the request to the Test module's Test_IndexController::indexAction() method. If I go to (which should be the one that works I think), I get this error:

NOTICE [8] Undefined index: test Notice on line 373 in file /xxx/lib/Zend/Controller/Dispatcher/Standard.php

This is because the addModuleDirectory doesn't lower case the name of the modules when it adds them, but when the Zend_Controller_Dispatcher_Standard checks if the module exists or not, in Zend_Controller_Dispatcher_Standard::isValidModule, it lower cases the module name for the check, but not when it accesses the module array in line 373: $this->_curDirectory = $controllerDirs[$module];

So either the addModuleDirectory method must transform the module names to lower case when it adds them, or the dispatcher must be made case sensitive.


Posted by Carlos Lage (carloslage) on 2009-04-23T11:27:12.000+0000

removing full path

Posted by Tom Neumerkel (tone86) on 2009-12-02T04:10:07.000+0000

Similarly to Carlos description, when the module name in file system is lowercase, and the first character of module name in URL is uppercase, PHP also throws a notice.

Notice: Undefined index: Test in /xxx/Zend/Controller/Dispatcher/Standard.php on line 379

I think, that the Zend_Controller_Dispatcher_Standard::isValidModule method have to test the module name for case sensitivity.

Zend version: $Id: Standard.php 19236 2009-11-25 14:45:08Z bate $

Posted by Rob Allen (rob) on 2012-11-20T20:53:02.000+0000

Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".

Feel free to re-open and provide a patch if you want to fix this issue.

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.