php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #15621 directory with name '0' isn't listed
Submitted: 2002-02-19 09:10 UTC Modified: 2002-02-19 09:22 UTC
From: chocobot at gmx dot de Assigned:
Status: Not a bug Package: Directory function related
PHP Version: 4.1.1 OS: Linux Redhat
Private report: No CVE-ID: None
 [2002-02-19 09:10 UTC] chocobot at gmx dot de
i have a directory containing other directories, including one named '0'.
I try to use "while ($file = readdir($handle))" to go throug all entries, but none get listed! 
As soon as i rename that dir to something else, it works as expected.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-02-19 09:22 UTC] eru@php.net
This is not a bug. Please double-check the documentation available
at http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

You should use
while (false !== ($file = readdir ($handle)))

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 23:01:27 2024 UTC