Bug #17590 Updated: readdir fails on directory called "0"
| From: | derick@php.net | Date: | Tue, 04 Jun 2002 09:41:18 +0000 |
| Subject: | Bug #17590 Updated: readdir fails on directory called "0" | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-9440@lists.php.net to get a copy of this message | ||
ID: 17590
Updated by: derick@php.net
Reported By: mw@antitachyon.com
Status: Bogus
Bug Type: Directory function related
Operating System: SoL 13.37 (Linux)
PHP Version: 4.2.0
New Comment:
Sorry, but the bug system is not the appropriate forum for asking
support questions. Your problem does not imply a bug in PHP itself.
For a list of more appropriate places to ask for help using PHP,
please visit http://www.php.net/support.php
Thank you for your interest in PHP.
You have probably somethign like:
while ($a = readdir($dir)) {
in your code, this will not work as $a can be 0 sometimes (the name of
the directory)
while (($a = readdir) !== FALSE) { // note the !==
Derick
Previous Comments:
------------------------------------------------------------------------
[2002-06-04 05:35:30] mfischer@php.net
Sorry, but the bug system is not the appropriate forum for asking
support questions. Your problem does not imply a bug in PHP itself.
For a list of more appropriate places to ask for help using PHP,
please visit http://www.php.net/support.php
Thank you for your interest in PHP.
See php.net/opendir, you have to use the !== operator.
------------------------------------------------------------------------
[2002-06-04 05:31:20] mw@antitachyon.com
If you have a directory which contains directories like "0" "1" "test"
"mytestdir" and so on the function "readdir" returns only "." and
".."
. If you remove the directory called "0" everything is fine again.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=17590&edit=1