Bug #66405 [Fbk->NoF]: RecursiveDirectoryIterator::CURRENT_AS_PATHNAME breaks the RecursiveIterator

From: Date: Tue, 30 Dec 2014 10:42:14 +0000
Subject: Bug #66405 [Fbk->NoF]: RecursiveDirectoryIterator::CURRENT_AS_PATHNAME breaks the RecursiveIterator
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-189451@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=66405&edit=1 ID: 66405 Updated by: php-bugs@lists.php.net Reported by: stof at notk dot org Summary: RecursiveDirectoryIterator::CURRENT_AS_PATHNAME breaks the RecursiveIterator -Status: Feedback +Status: No Feedback Type: Bug Package: SPL related PHP Version: 5.5.7 Assigned To: salathe Private report: N New Comment: No feedback was provided. The bug is being suspended because we assume that you are no longer experiencing the problem. If this is not the case and you are able to provide the information that was requested earlier, please do so and change the status of the bug back to "Re-Opened". Thank you. Previous Comments: ------------------------------------------------------------------------ [2014-11-29 13:04:18] jpauli@php.net Please try using this snapshot: http://snaps.php.net/php5.5-latest.tar.gz For Windows: http://windows.php.net/snapshots/ ------------------------------------------------------------------------ [2014-06-09 13:01:48] stof at notk dot org If I ask to get the current element as path name, I should indeed get a path when calling current(). But I don't see why this should change the value returned by children() to an invalid value, thus breaking the code ------------------------------------------------------------------------ [2014-06-08 21:49:01] stas@php.net I'm not sure how it is a bug. If you ask the iterator to return pathname, shouldn't it return the pathname as you asked? ------------------------------------------------------------------------ [2014-05-07 04:39:16] paul at paulgarvin dot net I ran into this bug as well. Created a pull request at Github[1] with fix and test case. [1] https://github.com/php/php-src/pull/665 ------------------------------------------------------------------------ [2014-01-03 18:47:25] stof at notk dot org But this is exactly what I'm reporting. The implementation of RecursiveDirectoryIterator is wrong in the SPL when you ask to return the pathname for the current item. It should not change the return value of getChildren to a string. It is not a documentation problem (well, there may be a need to clarify the RecursiveIterator doc, but this is a different topic). ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at https://bugs.php.net/bug.php?id=66405 -- Edit this bug report at https://bugs.php.net/bug.php?id=66405&edit=1

« previous php.bugs (#189451) next »