Home » File System » File » Bug #4911
Bad test in File_Util::isAbsolute
Details
| Submitted | 2005-07-25 18:22 UTC |
|---|---|
| From | kars at kde dot nl |
| Assigned | mike |
| Status | Closed |
| Package | File |
| PHP Version | 4.4.0 |
| OS | Linux |
| Roadmaps | (Not assigned) |
Comments
[2005-07-25 18:22 UTC] kars at kde dot nl
Description:
------------
I was browsing through File/Util.php on my Linux box with PHP 4.4.0, and noticed that isAbsolute considers a path that contains two periods -anywhere- in the path as a relative path.
It's still there in CVS for as far as I can tell, on line 179.
Test script:
---------------
require_once ('File/Util.php');
$filename = '/pub/audio/misc/Just... a song.mp3';
if (File_Util::isAbsolute($filename)) {
echo "'$filename' is absolute.";
} else {
echo "'$filename' is relative.";
}
Expected result:
----------------
The test should produce:
'/pub/audio/misc/Just... a song.mp3' is absolute.
Actual result:
--------------
What I got was:
'/pub/audio/misc/Just... a song.mp3' is relative.