Issue Details (XML | Word | Printable)

Key: ZF-3151
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Matthew Weier O'Phinney
Reporter: Gustavo Narea
Votes: 0
Watchers: 2
Operations

If you were logged in you would be able to see more operations.
Google issue summary
Zend Framework

The ZF is not able to use user-defined autoloaders for user-defined classes

Created: 19/Apr/08 10:05 AM   Updated: 14/May/09 05:47 AM   Resolved: 14/May/09 05:47 AM
Component/s: Zend_Loader
Affects Version/s: 1.5.1
Fix Version/s: 1.8.2

Time Tracking:
Original Estimate: Not Specified
Remaining Estimate: 0 minutes
Remaining Estimate - 0 minutes
Time Spent: 3 hours
Time Spent - 3 hours

File Attachments: 1. File patch-zf-v4.dif (7 kB)
2. File patch_to_bug_3151-3rd_edition.dif (5 kB)
3. File patch_to_bug_3151.dif (3 kB)
4. File patch_to_bug_3151.dif (2 kB)

Issue Links:
Duplicate


 Description  « Hide

Some ZF classes load user-defined classes (such as Zend_Db_Table_Abstract::fetchRow()) with Zend_Locale::loadClass(). However, the loadClass() method will not work if the user-defined class is not in the PHP's include_path and/or has an application-specific prefix. User-defined autoloaders would work, but Zend_Locale::loadClass() doesn't use them, even if it couldn't load the requested class.

Zend_Locale::loadClass() should use a third optional parameter, $tryUserAutoloaders = false, for this method to try loading the requested class with user-defined autoloaders if it itself couldn't load the requested class.

I'm going to fix this because I need it for my code to work.



Gustavo Narea added a comment - 19/Apr/08 11:02 AM

The path to fix the bug.


Gustavo Narea added a comment - 22/Apr/08 10:17 AM

The previous patch was incomplete. This also takes into account other instances where the third optional parameter of loadClass() should be used.


Gustavo Narea added a comment - 22/Apr/08 11:41 AM

Hopefully, this is the final edition of the patch (I've found more code to fix).


Gustavo Narea added a comment - 02/May/08 12:23 PM

I found some more code I had to fix, hence the fourth version of my patch.


Matthew Weier O'Phinney added a comment - 22/Nov/08 09:10 AM

Postponed until 2.0.


Matthew Weier O'Phinney added a comment - 14/May/09 05:47 AM

This should now be resolved in trunk and the 1.8 release branch.