WordPress.org

Make WordPress Core

Changeset 45611 for trunk/phpcs.xml.dist


Ignore:
Timestamp:
07/09/2019 05:44:42 AM (7 months ago)
Author:
pento
Message:

Coding Standards: Fix instances of WordPress.PHP.NoSilencedErrors.Discouraged.

Noteable changes:

  • The magic_quotes_runtime and magic_quotes_sybase settings were removed in PHP 5.4, so no longer need to be set.
  • Some functions that use external libraries can generate errors that can't be tested for, so are globally allowed to silence errors.
  • Quite a few functions would cause errors if safe_mode was set. This setting was removed in PHP 5.4.
  • Only a handful of header() calls needed corresponding headers_sent() checks for unit tests to pass, but more may need to be added as the nightlies builds are tested.

See #46732.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/phpcs.xml.dist

    r45607 r45611  
    222222    </rule>
    223223
     224    <rule ref="WordPress.PHP.NoSilencedErrors">
     225        <properties>
     226            <property name="custom_whitelist" type="array">
     227                <element value="ssh2_connect"/>
     228                <element value="ssh2_auth_password"/>
     229                <element value="ssh2_auth_pubkey_file"/>
     230                <element value="ftp_ssl_connect"/>
     231                <element value="ftp_connect"/>
     232                <element value="ftp_get_option"/>
     233                <element value="ftp_set_option"/>
     234                <element value="disk_free_space"/>
     235                <element value="getimagesize"/>
     236                <element value="iptcparse"/>
     237                <element value="exif_read_data"/>
     238                <element value="gzinflate"/>
     239                <element value="gzuncompress"/>
     240                <element value="gzdecode"/>
     241            </property>
     242        </properties>
     243    </rule>
     244
    224245    <!-- Assignments in while conditions are a valid method of looping over iterables -->
    225246    <rule ref="WordPress.CodeAnalysis.AssignmentInCondition.FoundInWhileCondition">
Note: See TracChangeset for help on using the changeset viewer.