#36064 [NEW]: RecursiveDirectoryIterator::hasChildren 's problem

From: Date: Wed, 18 Jan 2006 06:11:30 +0000
Subject: #36064 [NEW]: RecursiveDirectoryIterator::hasChildren 's problem
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-92113@lists.php.net to get a copy of this message
From: sqchen at citiz dot net Operating system: redhat 7.3 PHP version: 5.1.2 PHP Bug Type: Unknown/Other Function Bug description: RecursiveDirectoryIterator::hasChildren 's problem Description: ------------ php manual says RecursiveDirectoryIterator::hasChildren() Returns whether current entry is a directory and not '.' or '..' () Reproduce code: --------------- <?php $obj = new RecursiveDirectoryIterator("bbb"); $obj->rewind(); for($i=0;$i<5;$i++){ var_dump($obj->key()); var_dump($obj->hasChildren()); $obj->next(); } ?> directory bbb included: 1.txt ccc p.txt //ccc is a directory Expected result: ---------------- string(9) "bbb/1.txt" bool(false) string(7) "bbb/ccc" bool(true) string(9) "bbb/p.txt" bool(false) string(4) "bbb/" bool(false) string(4) "bbb/" bool(false) Actual result: -------------- string(9) "bbb/1.txt" bool(false) string(7) "bbb/ccc" bool(true) string(9) "bbb/p.txt" bool(false) string(4) "bbb/" bool(true) string(4) "bbb/" bool(true) -- Edit bug report at http://bugs.php.net/?id=36064&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=36064&r=trysnapshot44 Try a CVS snapshot (PHP 5.1): http://bugs.php.net/fix.php?id=36064&r=trysnapshot51 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=36064&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=36064&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=36064&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=36064&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=36064&r=needscript Try newer version: http://bugs.php.net/fix.php?id=36064&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=36064&r=support Expected behavior: http://bugs.php.net/fix.php?id=36064&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=36064&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=36064&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=36064&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=36064&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=36064&r=dst IIS Stability: http://bugs.php.net/fix.php?id=36064&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=36064&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=36064&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=36064&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=36064&r=mysqlcfg

« previous php.bugs (#92113) next »