0
0
mirror of https://github.com/PHPMailer/PHPMailer.git synced 2024-09-20 01:52:15 +02:00

Remove deprecated message for PHP 7.4+ (#2015)

PHPMailer used in Joomla! 3 can't be updated to 6.x until Joomla! 4.0 is released because of minimum PHP version differences between Joomla! and PHPMailer. Could you please kindly accept this PR and release another version of PHPMailer 5.x that would not create a deprecated warning in PHP 7.4? This PR fixes the warning. Thanks :)
This commit is contained in:
Artur Stępień 2020-03-19 15:25:03 +01:00 committed by GitHub
parent dde1db1165
commit db4d3d0cdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2711,7 +2711,10 @@ class PHPMailer
if (!self::isPermittedPath($path) or !file_exists($path)) {
throw new phpmailerException($this->lang('file_open') . $path, self::STOP_CONTINUE);
}
$magic_quotes = get_magic_quotes_runtime();
$magic_quotes = false;
if( version_compare(PHP_VERSION, '7.4.0', '<') ) {
$magic_quotes = get_magic_quotes_runtime();
}
if ($magic_quotes) {
if (version_compare(PHP_VERSION, '5.3.0', '<')) {
set_magic_quotes_runtime(false);