|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #75536 FilesystemIterator forces SKIP_DOTS flag
Submitted: 2017-11-18 10:01 UTC Modified: 2021-10-20 13:47 UTC
Avg. Score:1.0 ± 0.0
Reproduced:0 of 1 (0.0%)
From: aaatoja at o2 dot pl Assigned:
Status: Open Package: SPL related
PHP Version: 7.1.11 OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2017-11-18 10:01 UTC] aaatoja at o2 dot pl
Hello. Was this bug fixed?

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);
var_dump($dir->getFlags()); //0 but . and .. are skipped

Expected result:
Constructor should apply passed flags.


Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-10-15 18:05 UTC]
-Assigned To: +Assigned To: cmb
 [2021-10-15 18:05 UTC]
I can reproduce this with PHP-7.4.
 [2021-10-19 10:51 UTC]
The following pull request has been associated:

Patch Name: Fix #75536: FilesystemIterator inconsistency regarding flags
On GitHub:
 [2021-10-20 13:47 UTC]
-Type: Bug +Type: Documentation Problem -Assigned To: cmb +Assigned To:
 [2021-10-20 13:47 UTC]
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.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Feb 23 01:01:30 2024 UTC