Bug #15723 Updated: dir->read() class/function fails when directory contains subdirectory '0'

From: Date: Tue, 26 Feb 2002 21:47:26 +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-1111@lists.php.net to get a copy of this message
ID: 15723 Updated by: alindeman@php.net -Summary: dir->read() class/function fails when directory contains subdirectory '0' Reported By: php.net@chiefworks.com -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] torben@php.net 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] 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

« previous php.bugs (#1111) next »