Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.4.1

Bug #4911 Bad test in File_Util::isAbsolute
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)    
Subscription  
Comments Add Comment Add patch


Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know! Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem : 4 + 8 = ?

 
 [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.

Comments

 [2005-08-09 07:52 UTC] mike
This bug has been fixed in CVS. In case this was a documentation problem, the fix will show up at the end of next Sunday (CET) on pear.php.net. In case this was a pear.php.net website problem, the change will show up on the website in short time. Thank you for the report, and for helping us make PEAR better.