ID: 32627 Updated by: [EMAIL PROTECTED] Reported By: alan dot harder at sun dot com -Status: Open +Status: Closed Bug Type: Filesystem function related Operating System: FreeBSD 4.11-STABLE PHP Version: 4.3.10 New Comment:
Thank you for your bug report. This issue has already been fixed in the latest released version of PHP, which you can download at http://www.php.net/downloads.php Previous Comments: ------------------------------------------------------------------------ [2005-04-07 18:23:45] alan dot harder at sun dot com Description: ------------ I have found that realpath() returns a path when it should return FALSE if only the last path component in the given string does not exist. Tested on php 4.3.10 and php4-STABLE-200504071438. Both tests and phpinfo can be viewed at http://realpath.moshpit.org/ Reproduce code: --------------- $x = realpath('/bad/path'); var_dump($x); $x = realpath('/badpath'); var_dump($x); $x = realpath('/tmp/badpath'); var_dump($x); View tests at http://realpath.moshpit.org/ Expected result: ---------------- FALSE for all three tests. Actual result: -------------- The first one works (gets FALSE), the other two return the path when they should return FALSE (assuming /tmp is valid). ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=32627&edit=1