Update PHPMailerAutoload.php

I have got an error:
Fatal error: __autoload() is no longer supported, use spl_autoload_register() instead in D:\xampp\htdocs\test\PHPMailer\PHPMailerAutoload.php on line 45

Then I edit line no 45:
function spl_autoload_register($classname)

Now my error is fixed. 
This reason for this error is
1. SPL autoloading was introduced in PHP 5.1.2
2.  __autoload() is no longer supported
So just change the function name
This commit is contained in:
SoumitraDas1 2024-01-02 00:44:28 +05:30 committed by GitHub
parent acba50393d
commit 099b907a70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -42,7 +42,7 @@ if (version_compare(PHP_VERSION, '5.1.2', '>=')) {
* Fall back to traditional autoload for old PHP versions
* @param string $classname The name of the class to load
*/
function __autoload($classname)
function spl_autoload_register($classname)
{
PHPMailerAutoload($classname);
}