ZF-10024: Autoloader doesn not make use of PHP5.3 closures as callbacks
Description
Zend_Loader_Autoloader::pushAutoloader() and sisters don't actually make use of anonymous functions. They accept them, but the code trying to execute the callback simply ignores closures.
Use case :
require_once 'Zend/Loader/Autoloader.php'; $autoload = Zend_Loader_Autoloader::getInstance(); $autoload->pushAutoloader(function ($class) { require str_replace('_','-',$class) . '.php'; });
$f = new Foo_Bar; // class not found (and should be)
Comments
Posted by julien PAULI (doctorrock83) on 2010-06-21T08:35:38.000+0000
Attached a patch
Posted by julien PAULI (doctorrock83) on 2010-06-21T10:03:28.000+0000
Attached a testcase
Posted by Matthew Weier O'Phinney (matthew) on 2010-06-21T10:38:32.000+0000
Patch applied (with edits) to trunk and 1.10 release branch.