Commit 8f7c632d authored by sun's avatar sun

- #2268607 by sun: Fixed PHPMailer library version is wrongly reported to be incompatible.

parent adec2e61
......@@ -16,12 +16,12 @@ function phpmailer_requirements($phase) {
if ($phase == 'runtime' && phpmailer_library_exists()) {
$mail = new PHPMailer();
$required_version = '5.2.5';
$mail_version = $mail->Version;
$installed_version = $mail->Version;
$requirements['phpmailer'] = array(
'title' => $t('PHPMailer library'),
'value' => $mail_version,
'value' => $installed_version,
);
if (!version_compare($required_version, $mail_version, '<=')) {
if (!version_compare($installed_version, $required_version, '>=')) {
$path = 'sites/all/libraries/phpmailer';
$requirements['phpmailer']['severity'] = REQUIREMENT_ERROR;
$requirements['phpmailer']['description'] = $t('PHPMailer @version or higher is required. Please <a href="@url">download the new version</a>, extract the archive and copy the contents to the following location:<br /><code>@path</code>. Make sure the main file, class.phpmailer.php, is located at<br /><code>@class</code>.', array(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment