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

Bug #4559 Incorrect PHP version check
Submitted: 2005-06-08 21:31 UTC
From: kirokomara at yahoo dot com Assigned: dufuz
Status: Closed Package: File
PHP Version: 4.3.11 OS: CentOS
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 : 30 - 19 = ?

 
 [2005-06-08 21:31 UTC] kirokomara at yahoo dot com
Description: ------------ I was looking at the source of CSV.php (CVS: $Id: CSV.php,v 1.19 2005/03/30 18:24:01 mike Exp $) to see the usage of some of the functions as they are not documented (at least I could not find the documentation) and I saw line 411: // Set auto detect line ending for Mac EOL support if < PHP 4.3.0. $phpver = version_compare('4.1.0', phpversion(), '<'); if ($phpver) { $oldini = ini_get('auto_detect_line_endings'); ini_set('auto_detect_line_endings', '1'); } In the function version_compare(), 4.1.0 should be replaced with 4.3.0 because "auto_detect_line_endings" was introduced in version 4.3.0 as stated by the comment before the function usage. Hope this helps, Kupo Reproduce code: --------------- // Set auto detect line ending for Mac EOL support if < PHP 4.3.0. $phpver = version_compare('4.1.0', phpversion(), '<'); if ($phpver) { $oldini = ini_get('auto_detect_line_endings'); ini_set('auto_detect_line_endings', '1'); } Expected result: ---------------- PHP warning that there is no such configuration variable as "auto_detect_line_endings"

Comments

 [2005-06-10 03:44 UTC] dufuz
fixed locally, will commit soon, thanks. Not sure how I failed on writing 4.3.0 in there ;)
 [2005-08-09 07:55 UTC] dufuz
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.