CMS MADE SIMPLE FORGE

CMS Made Simple Core

 

[#11771] Using php 7.2.3, you can no longer use the php mailer in the normal way.

avatar
Created By: Kim Birkeland Skorgenes (master3395)
Date Submitted: Fri Mar 16 18:46:13 -0400 2018

Assigned To:
Version: 2.2.7
CMSMS Version: 2.2.7
Severity: Trivial
Resolution: Fixed
State: Closed
Summary:
Using php 7.2.3, you can no longer use the php mailer in the normal way.
Detailed Description:
2018-03-16 20:36:12.359118 [NOTICE] [72.46.153.26:36365] [STDERR] PHP
Deprecated:  __autoload() is deprecated, use spl_autoload_register() instead in
/home/newstarg1/public_html/lib/phpmailer/PHPMailerAutoload.php on line 45

----------------------------------------------------------------------------------------------------------------------------------------------------------------

function PHPMailerAutoload($classname)
{
    //Can't use __DIR__ as it's only in PHP 5.3+
$filename =
dirname(__FILE__).DIRECTORY_SEPARATOR.'class.'.strtolower($classname).'.php';
    if (is_readable($filename)) {
        require $filename;
    }
}

if (version_compare(PHP_VERSION, '5.1.2', '>=')) {
    //SPL autoloading was introduced in PHP 5.1.2
    if (version_compare(PHP_VERSION, '5.3.0', '>=')) {
        spl_autoload_register('PHPMailerAutoload', true, true);
    } else {
        spl_autoload_register('PHPMailerAutoload');
    }
} else {
    /**
     * Fall back to traditional autoload for old PHP versions
     * @param string $classname The name of the class to load
     */
    function __autoload($classname)
    {
        PHPMailerAutoload($classname);
    }
}


History

Comments
avatar
Date: 2018-06-11 13:03
Posted By: Rolf (rolf1)

Fixed in SVN
      
avatar
Date: 2018-06-11 13:15
Posted By: Kim Birkeland Skorgenes (master3395)

Good, i'll close this :)
      
Updates

Updated: 2018-06-11 13:15
state: Open => Closed

Updated: 2018-06-11 13:03
resolution_id: => 7