From: david at grudl dot com Operating system: PHP version: 5.3.0 PHP Bug Type: SPL related Bug description: CachingIterator & DirectoryIterator incorrect behaviour
Description: ------------ Iteration over CachingIterator with DirectoryIterator leads to incorrect results. Reproduce code: --------------- // w/o CachingIterator $dir = new DirectoryIterator(dirname(__FILE__)); foreach ($dir as $val) { echo $val; } // with CachingIterator $iterator = new CachingIterator($dir); foreach ($iterator as $val) { echo $val; } Expected result: ---------------- It is expected the both code snippets produces the same result: . .. anyfile.php Actual result: -------------- // w/o CachingIterator: . .. anyfile.php // with CachingIterator: .. anyfile.php (empty string) -- Edit bug report at http://bugs.php.net/?id=49607&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=49607&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=49607&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=49607&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=49607&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=49607&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=49607&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=49607&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=49607&r=needscript Try newer version: http://bugs.php.net/fix.php?id=49607&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=49607&r=support Expected behavior: http://bugs.php.net/fix.php?id=49607&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=49607&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=49607&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=49607&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=49607&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=49607&r=dst IIS Stability: http://bugs.php.net/fix.php?id=49607&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=49607&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=49607&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=49607&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=49607&r=mysqlcfg