diff --git a/include/thirdparty/PHPMailer/class.phpmailer.php b/include/thirdparty/PHPMailer/class.phpmailer.php index 12a9587..0c1bdbe 100644 --- a/include/thirdparty/PHPMailer/class.phpmailer.php +++ b/include/thirdparty/PHPMailer/class.phpmailer.php @@ -2710,32 +2710,18 @@ class PHPMailer try { 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(); - if ($magic_quotes) { - if (version_compare(PHP_VERSION, '5.3.0', '<')) { - set_magic_quotes_runtime(false); - } else { - //Doesn't exist in PHP 5.4, but we don't need to check because - //get_magic_quotes_runtime always returns false in 5.4+ - //so it will never get here - ini_set('magic_quotes_runtime', false); } - } + // or : Deaktiviere https://www.php.net/get_magic_quotes_runtime/ + ini_set('magic_quotes_runtime', 0); + $file_buffer = file_get_contents($path); - $file_buffer = $this->encodeString($file_buffer, $encoding); - if ($magic_quotes) { - if (version_compare(PHP_VERSION, '5.3.0', '<')) { - set_magic_quotes_runtime($magic_quotes); - } else { - ini_set('magic_quotes_runtime', $magic_quotes); - } - } + $file_buffer = $this->encodeString($file_buffer, $encoding); return $file_buffer; - } catch (Exception $exc) { + } + catch (Exception $exc) { $this->setError($exc->getMessage()); return ''; - } + } } /**