ZF-7501: Path with // in the end of autoload method of Zend_Loader_Autoloader_Resource.

Issue Type: Bug Created: 2009-08-06T04:25:05.000+0000 Last Updated: 2009-09-23T10:52:42.000+0000 Status: Resolved Fix version(s): - 1.9.3 (22/Sep/09)

Reporter: Ondrej Sibrina (elsecz) Assignee: Pádraic Brady (padraic) Tags: - Zend_Loader

Related issues: Attachments: - Zend_Loader_Autoloader_Resource.ZF-7501.diff


I'm just learning Zend for 2 days but i think i found bug in the end of autoload method of Zend_Loader_Autoloader_Resource.

Now it looks like this:

    $final = substr($class, strlen($lastMatch));
    $path = $this->_components[$lastMatch];
    return include $path . '/' . str_replace('_', '/', $final) . '.php';

I think line with return should be like this:

return include $path . str_replace('_', '/', $final).'.php';

original line make '//' in path and file isn't include.

Check me please if i'm right.

Thanks Andy


Posted by Brenton Alker (brenton) on 2009-09-17T07:00:47.000+0000

Patch to match remove double // from generated path

Posted by Pádraic Brady (padraic) on 2009-09-17T08:07:42.000+0000

Fixed in r18169 - component path was not being trimmed. Let me know if this does not, by chance, resolve your issue - the patch was a bit ambiguous compared to the issue description and comment.

Have you found an issue?

See the Overview section for more details.


© 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.