ID: 15464
Updated by: [EMAIL PROTECTED]
Reported By: [EMAIL PROTECTED]
Status: Bogus
Bug Type: *Directory/Filesystem functions
Operating System: linux
PHP Version: 4.1.0
New Comment:
FWIW, I've explicitly stated this in the readdir() docs in
cvs now. Should show up in the online manual within a few
days.
Torben
Previous Comments:
------------------------------------------------------------------------
[2002-02-10 12:50:21] [EMAIL PROTECTED]
Bogusify.
------------------------------------------------------------------------
[2002-02-10 12:48:18] [EMAIL PROTECTED]
Yes, it works with :
while(($fichier=readdir($ptr)) !== false)
In fact, sorry, it's not really a bug, another thing which
works than I tryed :
do
{
$fichier=readdir($ptr);
...
}while($fichier<>"");
closedir($ptr);
This works with the do structure because there is always 2
minimum derectories which are . and ..
But your solution is better, thank you very much
Friendly,
Laurent
------------------------------------------------------------------------
[2002-02-10 12:29:20] [EMAIL PROTECTED]
Try
while(($fichier=readdir($ptr)) !== false)
------------------------------------------------------------------------
[2002-02-10 12:23:21] [EMAIL PROTECTED]
The problem is that the function is returning string "0" which gets
converted to FALSE which breaks out of the loop. I don't see an easy
way to fix this...
------------------------------------------------------------------------
[2002-02-10 06:04:13] [EMAIL PROTECTED]
Reproduced. There is something really strange going on...
Anyway, create a file or directory 0 and a couple of other (both
numeric and non-numeric) files and/or directories.
Sometimes it doesn't display any file starting with a number if there's
a file called 0. The 0 never shows up.
(tested with a recent 4.2.0-dev)
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://bugs.php.net/15464
--
Edit this bug report at http://bugs.php.net/?id=15464&edit=1