Make WordPress Core

Changeset 48045


Ignore:
Timestamp:
06/15/2020 02:54:23 PM (5 years ago)
Author:
desrosj
Message:

General: Continuing to work towards a passing PHP Compatibility scan.

  • Add phpcs:ignore statements to compatibility checks in PHPMailer.
  • Remove quotes around the assertion in an assert() call. This will trigger a deprecated notice under certain conditions on PHP 7.2.

Props jrf, desrosj.
See #49922, #48033.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

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

    r48033 r48045  
    854854    {
    855855        //Check overloading of mail function to avoid double-encoding
    856         if (ini_get('mbstring.func_overload') & 1) {
     856        if (ini_get('mbstring.func_overload') & 1) { // phpcs:ignore PHPCompatibility.IniDirectives.RemovedIniDirectives.mbstring_func_overloadDeprecated
    857857            $subject = $this->secureHeader($subject);
    858858        } else {
     
    14021402                $errorcode = 0;
    14031403                if (defined('INTL_IDNA_VARIANT_UTS46')) {
     1404                    // phpcs:ignore PHPCompatibility.ParameterValues.NewIDNVariantDefault.NotSet
    14041405                    $punycode = idn_to_ascii($domain, $errorcode, INTL_IDNA_VARIANT_UTS46);
    14051406                } elseif (defined('INTL_IDNA_VARIANT_2003')) {
     1407                    // phpcs:ignore PHPCompatibility.Constants.RemovedConstants.intl_idna_variant_2003Deprecated
    14061408                    $punycode = idn_to_ascii($domain, $errorcode, INTL_IDNA_VARIANT_2003);
    14071409                } else {
     1410                    // phpcs:ignore PHPCompatibility.ParameterValues.NewIDNVariantDefault.NotSet
    14081411                    $punycode = idn_to_ascii($domain, $errorcode);
    14091412                }
  • trunk/src/wp-includes/Text/Diff/Engine/shell.php

    r41686 r48045  
    8484            if ($from_line_no < $match[1] || $to_line_no < $match[4]) {
    8585                // copied lines
    86                 assert('$match[1] - $from_line_no == $match[4] - $to_line_no');
     86                assert($match[1] - $from_line_no == $match[4] - $to_line_no);
    8787                array_push($edits,
    8888                    new Text_Diff_Op_copy(
Note: See TracChangeset for help on using the changeset viewer.