mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-27 01:39:22 +02:00
Fix "Deprecated: __autoload() is deprecated"
Deprecated: __autoload() is deprecated, use spl_autoload_register() i
This commit is contained in:
parent
071289bc48
commit
441bfe74c1
@ -30,20 +30,9 @@ function PHPMailerAutoload($classname)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (version_compare(PHP_VERSION, '5.1.2', '>=')) {
|
//SPL autoloading was introduced in PHP 5.1.2
|
||||||
//SPL autoloading was introduced in PHP 5.1.2
|
if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
|
||||||
if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
|
spl_autoload_register('PHPMailerAutoload', true, true);
|
||||||
spl_autoload_register('PHPMailerAutoload', true, true);
|
|
||||||
} else {
|
|
||||||
spl_autoload_register('PHPMailerAutoload');
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
/**
|
spl_autoload_register('PHPMailerAutoload');
|
||||||
* Fall back to traditional autoload for old PHP versions
|
|
||||||
* @param string $classname The name of the class to load
|
|
||||||
*/
|
|
||||||
function __autoload($classname)
|
|
||||||
{
|
|
||||||
PHPMailerAutoload($classname);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user