Make WordPress Core


Ignore:
Timestamp:
10/03/2019 03:44:36 PM (5 years ago)
Author:
desrosj
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-phpmailer.php

    r46097 r46378  
    27132713                throw new phpmailerException($this->lang('file_open') . $path, self::STOP_CONTINUE);
    27142714            }
    2715             $magic_quotes = get_magic_quotes_runtime();
     2715            $magic_quotes = ( PHP_VERSION_ID < 70400 && get_magic_quotes_runtime() ); // WP: Patched for PHP 7.4.
    27162716            if ($magic_quotes) {
    27172717                if (version_compare(PHP_VERSION, '5.3.0', '<')) {
Note: See TracChangeset for help on using the changeset viewer.