From:             kriss at krizalys dot com
Operating system: Linux
PHP version:      5.3.21
Package:          SPL related
Bug Type:         Bug
Bug description:RecursiveDirectoryIterator always assumes SKIP_DOTS

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 bug report at https://bugs.php.net/bug.php?id=64228&edit=1
-- 
Try a snapshot (PHP 5.4):   
https://bugs.php.net/fix.php?id=64228&r=trysnapshot54
Try a snapshot (PHP 5.3):   
https://bugs.php.net/fix.php?id=64228&r=trysnapshot53
Try a snapshot (trunk):     
https://bugs.php.net/fix.php?id=64228&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=64228&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=64228&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=64228&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=64228&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=64228&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=64228&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=64228&r=notwrong
Not enough info:            
https://bugs.php.net/fix.php?id=64228&r=notenoughinfo
Submitted twice:            
https://bugs.php.net/fix.php?id=64228&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=64228&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64228&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=64228&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=64228&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=64228&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=64228&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=64228&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=64228&r=mysqlcfg

Reply via email to