Bug #64228 [Opn->Csd]: RecursiveDirectoryIterator always assumes SKIP_DOTS
| From: | laruence@php.net | Date: | Sun, 17 Feb 2013 03:05:00 +0000 |
| Subject: | Bug #64228 [Opn->Csd]: RecursiveDirectoryIterator always assumes SKIP_DOTS | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-176661@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=64228&edit=1
ID: 64228
Updated by: laruence@php.net
Reported by: kriss at krizalys dot com
Summary: RecursiveDirectoryIterator always assumes SKIP_DOTS
-Status: Open
+Status: Closed
Type: Bug
Package: SPL related
Operating System: Linux
PHP Version: 5.3.21
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=01ae5c3c2ff47ca66031ec4a750a30d97c64c492
Log: Fixed bug #64228 (RecursiveDirectoryIterator always assumes SKIP_DOTS)
Previous Comments:
------------------------------------------------------------------------
[2013-02-16 18:46:38] kriss at krizalys dot com
Description:
------------
RecursiveDirectoryIterator always assumes SKIP_DOTS, even when the flag is not passed in the
constructor.
To reproduce the bug, create an empty directory named "empty", and in the parent folder,
create and run from the command line the PHP following script.
Test script:
---------------
<?php
$i = new RecursiveDirectoryIterator('empty', FilesystemIterator::KEY_AS_PATHNAME |
FilesystemIterator::CURRENT_AS_FILEINFO); // Note the absence of FilesystemIterator::SKIP_DOTS
foreach ($i as $key => $value) {
echo "$value\n";
}
?>
Expected result:
----------------
$ php -f script.php
empty/.
empty/..
$
Actual result:
--------------
$ php -f script.php
$
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=64228&edit=1