Issues

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

Issue Type: Bug Created: 2008-04-19T10:05:52.000+0000 Last Updated: 2009-05-14T05:47:51.000+0000 Status: Resolved Fix version(s): - 1.8.2 (27/May/09)

Reporter: Gustavo Narea (gustavo) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Loader

Related issues: - ZF-2533

Attachments: - patch-zf-v4.dif

Description

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.

Comments

Posted by Gustavo Narea (gustavo) on 2008-04-19T11:02:11.000+0000

The path to fix the bug.

Posted by Gustavo Narea (gustavo) on 2008-04-22T10:17:45.000+0000

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

Posted by Gustavo Narea (gustavo) on 2008-04-22T11:41:04.000+0000

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

Posted by Gustavo Narea (gustavo) on 2008-05-02T12:23:11.000+0000

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

Posted by Matthew Weier O'Phinney (matthew) on 2008-11-22T09:10:21.000+0000

Postponed until 2.0.

Posted by Matthew Weier O'Phinney (matthew) on 2009-05-14T05:47:51.000+0000

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

Have you found an issue?

See the Overview section for more details.

Copyright

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

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

Contacts