Bug #15723 Updated: dir->read() class/function fails when directory contains subdirectory '0'
| From: | torben@php.net | Date: | Tue, 26 Feb 2002 06:38:44 +0000 |
| Subject: | Bug #15723 Updated: dir->read() class/function fails when directory contains subdirectory '0' | ||
| References: | 1 | Groups: | php.bugs php.doc |
| Request: | Send a blank email to php-bugs+get-1046@lists.php.net to get a copy of this message | ||
ID: 15723
Updated by: torben@php.net
-Summary: dir->read() class/function fails when directory
contains subdirectory '0'
Reported By: php.net@chiefworks.com
Status: Open
-Bug Type: Unknown/Other Function
+Bug Type: Documentation problem
Operating System: Linux 2.4
PHP Version: 4.1.1
New Comment:
I'm changing this to a documentation problem, since it should
be explained on the dir() manual page. It is explained
here: http://www.php.net/readdir, however.
The gist is that '0' evaluates to false in PHP.
Torben
Previous Comments:
------------------------------------------------------------------------
[2002-02-26 00:30:26] php.net@chiefworks.com
$d = dir('.');
while ($entry = $d->read()) {
echo "$entry \n";
}
$d->close();
The above script works fine on mosth direcotries, but if the direcoty
contains a subdirectory "0", it stops as soon as it gets to it and only
outputs the . and .. entries.
Caleb
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=15723&edit=1