|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #8822 readdir doesn't return directories starting with a digit
Submitted: 2001-01-20 16:03 UTC Modified: 2001-01-20 16:28 UTC
From: vahan at design dot am Assigned:
Status: Closed Package: Directory function related
PHP Version: 4.0 Latest CVS (20/01/2001) OS: FreeBSD
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: vahan at design dot am
New email:
PHP Version: OS:


 [2001-01-20 16:03 UTC] vahan at design dot am
function dir_list($dirname) 
 while ($file = readdir($handle)) 
   if($file=='.'||$file=='..') continue;
 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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-20 16:28 UTC]
Your script is wrong.  Use:

while (($file = readdir($handle))!==false)

PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Jul 24 04:01:23 2021 UTC