From: [EMAIL PROTECTED] Operating system: Linux PHP version: 4.1.2 PHP Bug Type: Filesystem function related Bug description: file_exists generates a verbose warning in addition to return code.
Upon upgrading to PHP 4.1.2, all calls which use the file_exists() function to verify files within a non-existent sub-directory, are generating a stat warning (which was not the case in 4.0.6). Example code: if (file_exists($dir.'/filename.ext')) { FOO; } If $dir doesn't exist, the following warning is generated: Warning: stat failed for dir/filename.exe (errno=20 - Not a directory) in script.php on line n. This is easily silenced by calling @file_exists instead, but it doesn't seem like the desired behavior. -- Edit bug report at http://bugs.php.net/?id=15932&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=15932&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=15932&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=15932&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=15932&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=15932&r=support Expected behavior: http://bugs.php.net/fix.php?id=15932&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=15932&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=15932&r=submittedtwice