Zend Framework

include warning with same module and namespace name

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.8.1
  • Fix Version/s: 1.9.2
  • Labels:
    None

Description

I have an autoloaded namespace "My_" (in my include dir APPLICATION_PATH/lib)
I have a module named "My"

When my module resource is boostraped, I have an include warnings form Zend autolaoder :

Warning: include(My/Bootstrap.php) [function.include]: failed to open stream: No such file or directory in /usr/local/share/ZendFramework-1.8.1/library/Zend/Loader.php on line 83

What I think :

In Zend_Application_Resource_Modules, line 71
The "class_exists call" try to test the class My_Bootstrap : so the autoloader from the namespace "My" try to load lib/My/Bootstrap.php => no correct, it has to test modules/my/Bootstap.php

Activity

Hide
Joffrey added a comment -

My suggest :

in "Application/Resource/Modules.php" :
line 71,

Replace
"if (!class_exists($bootstrapClass)) {"
By
if (!class_exists($bootstrapClass, false)) {

why ?
It hasn't to try autoload because it includes the file in 3 next line (72..74)

Show
Joffrey added a comment - My suggest : in "Application/Resource/Modules.php" : line 71, Replace "if (!class_exists($bootstrapClass)) {" By if (!class_exists($bootstrapClass, false)) { why ? It hasn't to try autoload because it includes the file in 3 next line (72..74)
Hide
Matthew Weier O'Phinney added a comment -

This was fixed in a previous release at some point.

Show
Matthew Weier O'Phinney added a comment - This was fixed in a previous release at some point.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: