ZF-10547: Zend_OpenId_Consumer_Storage_File::purgeNonces() foreach on glob() without checking for null

Issue Type: Bug Created: 2010-10-11T07:31:54.000+0000 Last Updated: 2010-10-19T09:09:55.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_OpenId

Related issues: Attachments:


482: foreach (glob($this->dir . '/nonce*') as $name) { 483: @unlink($name);

491: foreach (glob($this->dir . '/nonce*') as $name) { 492: if (filemtime($name) < $time) { 493: @unlink($name);

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


Posted by Matthew Weier O'Phinney (matthew) on 2010-10-19T09:09:50.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.