ZF-10546: Zend_Loader_Autoloader::_getAvailableVersions() foreach on glob() without checking for null

Issue Type: Bug Created: 2010-10-11T07:28:49.000+0000 Last Updated: 2010-10-19T09:10:11.000+0000 Status: Resolved Fix version(s): - 1.11.0 (02/Nov/10)

Reporter: Michal Zajac (manwe) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Loader

Related issues: Attachments:


562: $dirs = glob("$path/*", GLOB_ONLYDIR); 563: foreach ($dirs as $dir) {

On some systems (for example with open_basedir) glob() might return NULL instead of empty array. $dirs needs to be checked before calling foreach, or return from glob() casted to (array).


Posted by Matthew Weier O'Phinney (matthew) on 2010-10-19T09:10:10.000+0000

Fixed in trunk and 1.11 release branch; thanks for the report!

Have you found an issue?

See the Overview section for more details.


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

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