summaryrefslogtreecommitdiff
path: root/ext/zip/lib/zip_stat_init.c
diff options
context:
space:
mode:
authorPaul Garvin <paul@paulgarvin.net>2014-05-07 00:17:45 -0400
committerJulien Pauli <jpauli@php.net>2014-11-29 12:04:44 +0100
commit605d32bedda1a3da6f5d012811b074ce8b59ae5d (patch)
tree6927ddef2d71899c20f753940fcc073a58dce207 /ext/zip/lib/zip_stat_init.c
parent1813fe9f386facf8a8982eca3141007b09bdcc70 (diff)
downloadphp-git-605d32bedda1a3da6f5d012811b074ce8b59ae5d.tar.gz
SPL: Fix for bug 66405 RecursiveDirectoryIterator with CURRENT_AS_PATHNAME
Currently when you use RecursiveDirectoryIterator with the CURRENT_AS_PATHNAME flag PHP will throw an UnexpectedValueException with message 'Objects returned by RecursiveIterator::getChildren() must implement RecursiveIterator'.This happend because getChildren() will return the current directory name instead of an Iterator (or subclass of) as required by the RecursiveIterator interface. This commit changes getChildren() to return annother RecursiveDirectoryIterator but current() still returns the path name when CURRENT_AS_PATHNAME is used. A PHPT test case (bug66405.phpt) that reproduces the bug is included. This fix was originally against the PHP-5.4 branch, but it was not merged before 5.4 reached EOL. I am hoping to get it applied to 5.5, 5.6, and master.
Diffstat (limited to 'ext/zip/lib/zip_stat_init.c')
0 files changed, 0 insertions, 0 deletions