PHP 4.0 Bug #8823: readdir doesn't return directories starting with a digit
| From: | vahan at design dot am | Date: | Sat, 20 Jan 2001 21:07:41 +0000 |
| Subject: | PHP 4.0 Bug #8823: readdir doesn't return directories starting with a digit | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-44645@lists.php.net to get a copy of this message | ||
From: vahan@design.am
Operating system: FreeBSD
PHP version: 4.0 Latest CVS (20/01/2001)
PHP Bug Type: Directory function related
Bug description: readdir doesn't return directories starting with a digit
function dir_list($dirname)
{
if($dirname[strlen($dirname)-1]!='/')
$dirname.='/';
$handle=opendir($dirname);
while ($file = readdir($handle))
{
if($file=='.'||$file=='..') continue;
$result_array[]=$dirname.$file;
}
closedir($handle);
return $result_array;
};
executed for a directory which has subdirectory that has a digit/special character as a first
character of it's name,
then that subdirectory won't be included in the $result_array
--
Edit Bug report at: http://bugs.php.net/?id=8823&edit=1