Make WordPress Core

Ticket #47783: 47783-magic_quotes_deprecation-phpmailer.patch

File 47783-magic_quotes_deprecation-phpmailer.patch, 740 bytes (added by ayeshrajans, 6 years ago)
  • src/wp-includes/class-phpmailer.php

    diff --git a/src/wp-includes/class-phpmailer.php b/src/wp-includes/class-phpmailer.php
    index 7f5e353578..d7abcb4b46 100644
    a b protected function encodeFile($path, $encoding = 'base64') 
    26902690            if (!is_readable($path)) {
    26912691                throw new phpmailerException($this->lang('file_open') . $path, self::STOP_CONTINUE);
    26922692            }
    2693             $magic_quotes = get_magic_quotes_runtime();
     2693            $magic_quotes = PHP_VERSION_ID < 70400 && get_magic_quotes_runtime();
    26942694            if ($magic_quotes) {
    26952695                if (version_compare(PHP_VERSION, '5.3.0', '<')) {
    26962696                    set_magic_quotes_runtime(false);