php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #7344 opendir always returns a resource even on non-existen directories
Submitted: 2000-10-19 11:32 UTC Modified: 2001-04-29 14:00 UTC
From: jalal@php.net Assigned:
Status: Closed Package: Directory function related
PHP Version: 4.0 Latest CVS (19/10/2000) OS: WinNT4sp6
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.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: jalal@php.net
New email:
PHP Version: OS:

 

 [2000-10-19 11:32 UTC] jalal@php.net
See subject line...
Try code:

$dir = "/somewhere/on/my/drive";
$res = opendir( $dir );
echo "\$dir=$dir, \$res = $res\n";

returns:
$dir=/somewhere/on/my/drive, $res = Resource ID #1

(/somewhere/on/my/drive is not a real directory.

On linux, the same code returns a false;

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-01-12 15:50 UTC] cynic@php.net
a me-too...
the same on NT 5, mod_php4 from php4-200101120245
 [2001-04-29 13:15 UTC] andi@php.net
Please try the latest CVS and open a new bug report if this is still the case.
 [2001-04-29 13:38 UTC] jmoore@php.net
this still is the case with yesterdays CVS.

- James
 [2001-04-29 14:00 UTC] andi@php.net
Fixed in latest CVS.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 03:01:29 2024 UTC