General: Patch PHMailer for PHP 7.4 compatibility.

This patches the PHPMailer library in Core to be PHP 7.4 compatible by adding a version check before calling `get_magic_quotes_runtime()`.

Props ayeshrajans, jrf.
See #47783.
Built from https://develop.svn.wordpress.org/trunk@46378


git-svn-id: http://core.svn.wordpress.org/trunk@46177 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
desrosj 2019-10-03 15:45:59 +00:00
parent 6fa7f757d4
commit b763447019
2 changed files with 2 additions and 2 deletions

View File

@ -2712,7 +2712,7 @@ class PHPMailer
if (!self::isPermittedPath($path) or !file_exists($path)) { if (!self::isPermittedPath($path) or !file_exists($path)) {
throw new phpmailerException($this->lang('file_open') . $path, self::STOP_CONTINUE); throw new phpmailerException($this->lang('file_open') . $path, self::STOP_CONTINUE);
} }
$magic_quotes = get_magic_quotes_runtime(); $magic_quotes = ( PHP_VERSION_ID < 70400 && get_magic_quotes_runtime() ); // WP: Patched for PHP 7.4.
if ($magic_quotes) { if ($magic_quotes) {
if (version_compare(PHP_VERSION, '5.3.0', '<')) { if (version_compare(PHP_VERSION, '5.3.0', '<')) {
set_magic_quotes_runtime(false); set_magic_quotes_runtime(false);

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.3-beta2-46377'; $wp_version = '5.3-beta2-46378';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.