Make WordPress Core

Changeset 60797


Ignore:
Timestamp:
09/24/2025 10:41:39 AM (4 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Move specific sniff exclusions for PHPMailer to the config file.

This aims to make future updates of the library easier.

Follow-up to [48045], [51635].

See #63168.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/phpcompat.xml.dist

    r60795 r60797  
    7777    -->
    7878
     79    <rule ref="PHPCompatibility.IniDirectives.RemovedIniDirectives.mbstring_func_overloadDeprecated">
     80        <exclude-pattern>/PHPMailer/PHPMailer\.php$</exclude-pattern>
     81    </rule>
     82    <rule ref="PHPCompatibility.Constants.RemovedConstants.intl_idna_variant_2003Deprecated">
     83        <exclude-pattern>/PHPMailer/PHPMailer\.php$</exclude-pattern>
     84    </rule>
     85    <rule ref="PHPCompatibility.ParameterValues.NewIDNVariantDefault.NotSet">
     86        <exclude-pattern>/PHPMailer/PHPMailer\.php$</exclude-pattern>
     87    </rule>
    7988    <rule ref="PHPCompatibility.FunctionUse.NewFunctions.sodium_crypto_sign_keypair_from_secretkey_and_publickeyFound">
    8089        <exclude-pattern>/sodium_compat/src/Compat\.php$</exclude-pattern>
  • trunk/src/wp-includes/PHPMailer/PHPMailer.php

    r60623 r60797  
    877877    {
    878878        //Check overloading of mail function to avoid double-encoding
    879         if ((int)ini_get('mbstring.func_overload') & 1) { // phpcs:ignore PHPCompatibility.IniDirectives.RemovedIniDirectives.mbstring_func_overloadDeprecated
     879        if ((int)ini_get('mbstring.func_overload') & 1) {
    880880            $subject = $this->secureHeader($subject);
    881881        } else {
     
    15331533                } elseif (defined('INTL_IDNA_VARIANT_2003')) {
    15341534                    //Fall back to this old, deprecated/removed encoding
    1535                     // phpcs:ignore PHPCompatibility.Constants.RemovedConstants.intl_idna_variant_2003Deprecated
    15361535                    $punycode = idn_to_ascii($domain, $errorcode, \INTL_IDNA_VARIANT_2003);
    15371536                } else {
    15381537                    //Fall back to a default we don't know about
    1539                     // phpcs:ignore PHPCompatibility.ParameterValues.NewIDNVariantDefault.NotSet
    15401538                    $punycode = idn_to_ascii($domain, $errorcode);
    15411539                }
Note: See TracChangeset for help on using the changeset viewer.