Edit report at https://bugs.php.net/bug.php?id=75536&edit=1
ID: 75536
Updated by: cmb@php.net
Reported by: aaatoja at o2 dot pl
Summary: FilesystemIterator forces SKIP_DOTS flag
Status: Assigned
-Type: Bug
+Type: Documentation Problem
Package: SPL related
PHP Version: 7.1.11
-Assigned To: cmb
+Assigned To:
Block user comment: N
Private report: N
New Comment:
flags===0 will be fully supported as of PHP 8.2.0, and it doesn't
make much sense to fix this long standing edge case, and then
having it changed again in the next PHP version, so I'm switching
to doc problem.
Previous Comments:
------------------------------------------------------------------------
[2021-10-19 10:51:26] cmb@php.net
The following pull request has been associated:
Patch Name: Fix #75536: FilesystemIterator inconsistency regarding flags
On GitHub: https://github.com/php/php-src/pull/7592
Patch: https://github.com/php/php-src/pull/7592.patch
------------------------------------------------------------------------
[2021-10-15 18:05:10] cmb@php.net
I can reproduce this with PHP-7.4.
------------------------------------------------------------------------
[2017-11-18 10:01:25] aaatoja at o2 dot pl
Description:
------------
Hello. Was this bug fixed?
https://bugs.php.net/bug.php?id=64228
It is still present on 7.1.11.
Test script:
---------------
$dir = new FilesystemIterator(__DIR__, 0);
var_dump($dir->getFlags()); //4096
$dir = new FilesystemIterator(__DIR__, 0);
$dir->setFlags(0);
var_dump($dir->getFlags()); //0 but . and .. are skipped
Expected result:
----------------
Constructor should apply passed flags.
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75536&edit=1