ID:               15723
 Updated by:       [EMAIL PROTECTED]
-Summary:          dir->read() class/function fails when directory
                   contains subdirectory '0'
 Reported By:      [EMAIL PROTECTED]
 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] [EMAIL PROTECTED]

$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

Reply via email to