Patch the phpmailer library so it doesn't generate a PHP warning when spl_autoload_functions() returns FALSE

This commit is contained in:
Tristan Olive 2014-11-14 17:29:06 -05:00
parent e7013e582b
commit 5696b75ab1
1 changed files with 2 additions and 1 deletions

View File

@ -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';
}
}