Make WordPress Core


Ignore:
Timestamp:
09/26/2025 09:08:52 PM (9 months ago)
Author:
SergeyBiryukov
Message:

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

This aims to make future updates of the library easier.

Follow-up to [47735], [47737], [47902].

See #63168.

File:
1 edited

Legend:

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

    r56975 r60800  
    426426
    427427        // Check safe_mode off
    428         if (preg_match('#(1|ON)#i', ini_get('safe_mode'))) { // phpcs:ignore PHPCompatibility.IniDirectives.RemovedIniDirectives.safe_modeDeprecatedRemoved
     428        if (preg_match('#(1|ON)#i', ini_get('safe_mode'))) {
    429429            $this->warning('WARNING: Safe mode is on, shorten support disabled, md5data/sha1data for ogg vorbis disabled, ogg vorbos/flac tag writing disabled.');
    430430        }
    431431
    432         // phpcs:ignore PHPCompatibility.IniDirectives.RemovedIniDirectives.mbstring_func_overloadDeprecated
    433432        if (($mbstring_func_overload = (int) ini_get('mbstring.func_overload')) && ($mbstring_func_overload & 0x02)) {
    434433            // http://php.net/manual/en/mbstring.overload.php
    435434            // "mbstring.func_overload in php.ini is a positive value that represents a combination of bitmasks specifying the categories of functions to be overloaded. It should be set to 1 to overload the mail() function. 2 for string functions, 4 for regular expression functions"
    436435            // getID3 cannot run when string functions are overloaded. It doesn't matter if mail() or ereg* functions are overloaded since getID3 does not use those.
    437             // phpcs:ignore PHPCompatibility.IniDirectives.RemovedIniDirectives.mbstring_func_overloadDeprecated
    438436            $this->startup_error .= 'WARNING: php.ini contains "mbstring.func_overload = '.ini_get('mbstring.func_overload').'", getID3 cannot run with this setting (bitmask 2 (string functions) cannot be set). Recommended to disable entirely.'."\n";
    439437        }
     
    443441            // Check for magic_quotes_runtime
    444442            if (function_exists('get_magic_quotes_runtime')) {
    445                 // phpcs:ignore PHPCompatibility.FunctionUse.RemovedFunctions.get_magic_quotes_runtimeDeprecated
    446443                if (get_magic_quotes_runtime()) { // @phpstan-ignore-line
    447444                    $this->startup_error .= 'magic_quotes_runtime must be disabled before running getID3(). Surround getid3 block by set_magic_quotes_runtime(0) and set_magic_quotes_runtime(1).'."\n";
     
    450447            // Check for magic_quotes_gpc
    451448            if (function_exists('get_magic_quotes_gpc')) {
    452                 // phpcs:ignore PHPCompatibility.FunctionUse.RemovedFunctions.get_magic_quotes_gpcDeprecated
    453449                if (get_magic_quotes_gpc()) { // @phpstan-ignore-line
    454450                    $this->startup_error .= 'magic_quotes_gpc must be disabled before running getID3(). Surround getid3 block by set_magic_quotes_gpc(0) and set_magic_quotes_gpc(1).'."\n";
     
    17911787            // currently vorbiscomment only works on OggVorbis files.
    17921788
    1793             // phpcs:ignore PHPCompatibility.IniDirectives.RemovedIniDirectives.safe_modeDeprecatedRemoved
    17941789            if (preg_match('#(1|ON)#i', ini_get('safe_mode'))) {
    17951790
Note: See TracChangeset for help on using the changeset viewer.