PHP_VERSION check bug in class.phpmailer.php
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
PHPDevShell |
Fix Released
|
Medium
|
TitanKing |
Bug Description
Both the legacy mailer and new plugin mailer has a PHP version check bug. This is not a PHPDevShell specific bug but rather a bug with the PHPMailer class used by PHPDevShell (class.
The issue start on line 1348:
if (PHP_VERSION < 6) {
}
$file_buffer = file_get_
$file_buffer = $this->
if (PHP_VERSION < 6) { set_magic_
Doing a version check using the method above doesn't always work since the PHP_VERSION constant is not always a valid number. When using Ubuntu for example the PHP_VERSION constant will return a string that looks something like this: 5.3.2-1ubuntu4.7
As with the rest of PHPDevShell's code the PHP version_compare() function should be used instead. In the case above the version check is done because the set_magic_
I recommend that the code above should be changed to:
if (version_
}
$file_buffer = file_get_
$file_buffer = $this->
if (version_
I also recommend that the author of the PHPMailer class should be notified of this problem or it should at least be checked if there isn't a later version of the PHPMailer class.
The bug needs to be fixed in both the following files:
includes/
plugins/
PHPDevShell version: V 3.0.4-Stable
Browser: Firefox v 4.0.1
OS: Ubuntu 10.04 LTS
Kernel: Linux 2.6.32-28
PHP Version: 5.3.2
MySQL Version: 5.1.41
Apache: 2.2.14
Changed in phpdevshell: | |
status: | New → Confirmed |
assignee: | nobody → TitanKing (titan-phpdevshell) |
Changed in phpdevshell: | |
status: | Confirmed → Fix Committed |
Changed in phpdevshell: | |
status: | Fix Committed → Fix Released |