ID:               15723
 Updated by:       [EMAIL PROTECTED]
-Summary:          dir->read() class/function fails when directory
                   contains subdirectory '0'
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Closed
 Bug Type:         Documentation problem
 Operating System: Linux 2.4
 PHP Version:      4.1.1
 New Comment:

This bug has been fixed in CVS.




Previous Comments:
------------------------------------------------------------------------

[2002-02-26 01:38:43] [EMAIL PROTECTED]

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

------------------------------------------------------------------------

[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