|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-07-06 01:44 UTC] sniper@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 20:00:01 2025 UTC |
Description: ------------ PHP4.3.6RC3 Actually. Previously reported for different versions; #21410, #16830 Will *at seemingly random* times produce incorrect behavior. IE: "./images/members/admin.jpg" does not exist, but for some reason it returns true. Apologies if this has been corrected in later versions, I can't tell - my ISP is evil. Reproduce code: --------------- function pictureExists($path, $extensions) { for ($i=0;$i<=count($extensions);$i++) { print $path . "." . $extensions[$i]; phpinfo(); print file_exists($path . "." . $extensions[$i]); print true; if (file_exists($path . "." . $extensions[$i]) == true) { return "." . $extensions[$i]; } } return false; } $path = "./images/members/admin"; $exts[] = "jpg"; pictureExists($path,$exts); Expected result: ---------------- return true Actual result: -------------- return false.