php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #42244 file_exists() always returns TRUE with the filename as wild-card char(*) on Win
Submitted: 2007-08-08 10:09 UTC Modified: 2007-08-09 10:50 UTC
From: mahesh dot vemula at in dot ibm dot com Assigned:
Status: Not a bug Package: Performance problem
PHP Version: 6CVS-2007-08-08 (snap) OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
43 - 33 = ?
Subscribe to this entry?

 
 [2007-08-08 10:09 UTC] mahesh dot vemula at in dot ibm dot com
Description:
------------
file_exists() function behavior on PHP6 differs with PHP5 for the filenames containing wild-card char(*). 
PHP6 always returns TRUE for the file name with "*", and matches any file with the filename containing wild-card char(*). This is happening only for Windows.

Reproduce code:
---------------
<?php
var_dump( file_exists("*") );
?>

Expected result:
----------------
bool(false)

Actual result:
--------------
bool(true)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-08-09 10:50 UTC] mahesh dot vemula at in dot ibm dot com
The probelm is fixed in latest snapshot.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 15:01:28 2024 UTC