Commit 96f7aa76 authored by justdave's avatar justdave Committed by sun

- #1967364 by justdave: Call to undefined method PHPMailer::__destruct().

parent 63d0deba
......@@ -15,11 +15,25 @@ function phpmailer_requirements($phase) {
if ($phase == 'runtime' && phpmailer_library_exists()) {
$mail = new PHPMailer();
$required_version = '5.2.5';
$mail_version = $mail->Version;
$requirements['phpmailer'] = array(
'title' => $t('PHPMailer library'),
'value' => $mail->Version,
'severity' => REQUIREMENT_OK,
'value' => $mail_version,
);
if (!version_compare($required_version, $mail_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(
'@version' => $required_version,
'@url' => 'https://github.com/PHPMailer/PHPMailer/tags',
'@path' => $path,
'@class' => $path . '/class.phpmailer.php',
));
}
else {
$requirements['phpmailer']['severity'] = REQUIREMENT_OK;
}
}
else {
drupal_load('module', 'libraries');
......
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