diff --git a/class.phpmailer.php b/class.phpmailer.php index 12a95875..f498e3b8 100644 --- a/class.phpmailer.php +++ b/class.phpmailer.php @@ -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);