WordPress.org

Make WordPress Core


Ignore:
Timestamp:
06/15/2020 02:54:23 PM (10 months 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.

File:
1 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                }
Note: See TracChangeset for help on using the changeset viewer.