php.net |  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
Votes:1
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
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.


Patches

Add a Patch

Pull Requests

Pull requests:

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2021-10-15 18:05 UTC] cmb@php.net
-Assigned To: +Assigned To: cmb
 [2021-10-15 18:05 UTC] cmb@php.net
I can reproduce this with PHP-7.4.
 [2021-10-19 10:51 UTC] 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-20 13:47 UTC] cmb@php.net
-Type: Bug +Type: Documentation Problem -Assigned To: cmb +Assigned To:
 [2021-10-20 13:47 UTC] cmb@php.net
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: Sat Apr 27 08:01:29 2024 UTC