From: Operating system: linux PHP version: 5.3.6 Package: Filesystem function related Bug Type: Bug Bug description:possibly a bug in file_exists() found
Description: ------------ When using built-in function "file_exists" in 5.3.5 I encountered a trouble of locating one file, which had apostrophe in its' name. $filename = "America's Army.png"; if ( file_exists($filename) ) echo "found it"; else echo "bug"; After backslashing the single quote ("America\'s Army.png"), I managed to get things working. I considered this as bug since it has nothing o do with DB/HTML backslashing, and also took me a few hours to find out what the problem was. Test script: --------------- // To test, copy a single file called "America's Army.png" to the initial dir $filename = "America's Army.png"; if ( file_exists($filename) ) echo "found it"; else echo "bug"; Expected result: ---------------- found it Actual result: -------------- bug -- Edit bug report at http://bugs.php.net/bug.php?id=54422&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=54422&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=54422&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=54422&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=54422&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=54422&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=54422&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=54422&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=54422&r=needscript Try newer version: http://bugs.php.net/fix.php?id=54422&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=54422&r=support Expected behavior: http://bugs.php.net/fix.php?id=54422&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=54422&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=54422&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=54422&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54422&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=54422&r=dst IIS Stability: http://bugs.php.net/fix.php?id=54422&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=54422&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=54422&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=54422&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=54422&r=mysqlcfg