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  


 [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] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!
 [2005-08-09 07:55 UTC] User who submitted this comment has not confirmed identity
If you submitted this note, check your email.If you do not have a message, click here to re-send
MANUAL CONFIRMATION IS NOT POSSIBLE.  Write a message to pear-dev@lists.php.net
to request the confirmation link.  All bugs/comments/patches associated with this

email address will be deleted within 48 hours if the account request is not confirmed!