diff --git a/drupal/sites/all/libraries/phpmailer/class.phpmailer.php b/drupal/sites/all/libraries/phpmailer/class.phpmailer.php index fe37a93bf8..c5bb51bd3a 100644 --- a/drupal/sites/all/libraries/phpmailer/class.phpmailer.php +++ b/drupal/sites/all/libraries/phpmailer/class.phpmailer.php @@ -571,7 +571,8 @@ class PHPMailer { $this->exceptions = ($exceptions == true); //Make sure our autoloader is loaded - if (!in_array('PHPMailerAutoload', spl_autoload_functions())) { + $registered_functions = spl_autoload_functions(); + if (!$registered_functions OR !in_array('PHPMailerAutoload', $registered_functions)) { require 'PHPMailerAutoload.php'; } }