Bug #80660 [NEW]: FilesystemIterator foreach-loop fails on fuse filesystems

From: Date: Fri, 22 Jan 2021 13:53:36 +0000
Subject: Bug #80660 [NEW]: FilesystemIterator foreach-loop fails on fuse filesystems
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-231712@lists.php.net to get a copy of this message
From: shop1 at mokraemer dot de Operating system: linux PHP version: 7.4.14 Package: *Directory/Filesystem functions Bug Type: Bug Bug description:FilesystemIterator foreach-loop fails on fuse filesystems Description: ------------ As for my testing, FilesystemIterator fails with the foreach loop while the while-next loop works as expected. Test script: --------------- <?php $iterator = new \FilesystemIterator( '/fuse-filesystem', \FilesystemIterator::CURRENT_AS_SELF | \FilesystemIterator::SKIP_DOTS ); echo "--while\n"; while($iterator->valid()) { echo $iterator->current()."\n"; $iterator->next(); } $iterator->rewind(); echo "--for\n"; foreach ($iterator as $entry) { echo $entry->getFilename()."\n"; } Expected result: ---------------- --while .hg file1.class.php file2.class.php --for .hg file1.class.php file2.class.php Actual result: -------------- --while .hg file1.class.php file2.class.php --for -- Edit bug report at https://bugs.php.net/bug.php?id=80660&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=80660&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=80660&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=80660&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=80660&r=needscript Try newer version: https://bugs.php.net/fix.php?id=80660&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=80660&r=support Expected behavior: https://bugs.php.net/fix.php?id=80660&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=80660&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=80660&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=80660&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=80660&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=80660&r=dst IIS Stability: https://bugs.php.net/fix.php?id=80660&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=80660&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=80660&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=80660&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=80660&r=mysqlcfg

« previous php.bugs (#231712) next »