From 5696b75ab15d217e5874ad5dbed618d07693e6bd Mon Sep 17 00:00:00 2001 From: Tristan Olive Date: Fri, 14 Nov 2014 17:29:06 -0500 Subject: [PATCH] Patch the phpmailer library so it doesn't generate a PHP warning when spl_autoload_functions() returns FALSE --- drupal/sites/all/libraries/phpmailer/class.phpmailer.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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'; } }