WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/16/2020 06:40:52 PM (11 months ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison where static strings are involved.

This reduces the number of WordPress.PHP.StrictComparisons.LooseComparison issues in half, from 1897 to 890.

Includes minor code layout fixes for better readability.

See #49542.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/ms-default-constants.php

    r47122 r47808  
    3737
    3838        // Uploads dir relative to ABSPATH.
    39         if ( 'wp-content/blogs.dir' == UPLOADBLOGSDIR && ! defined( 'BLOGUPLOADDIR' ) ) {
     39        if ( 'wp-content/blogs.dir' === UPLOADBLOGSDIR && ! defined( 'BLOGUPLOADDIR' ) ) {
    4040            define( 'BLOGUPLOADDIR', WP_CONTENT_DIR . '/blogs.dir/' . $site_id . '/files/' );
    4141        }
     
    156156    if ( defined( 'SUBDOMAIN_INSTALL' ) && defined( 'VHOST' ) ) {
    157157        $subdomain_error = true;
    158         if ( SUBDOMAIN_INSTALL !== ( 'yes' == VHOST ) ) {
     158        if ( SUBDOMAIN_INSTALL !== ( 'yes' === VHOST ) ) {
    159159            $subdomain_error_warn = true;
    160160        }
     
    164164    } elseif ( defined( 'VHOST' ) ) {
    165165        $subdomain_error = true;
    166         define( 'SUBDOMAIN_INSTALL', 'yes' == VHOST );
     166        define( 'SUBDOMAIN_INSTALL', 'yes' === VHOST );
    167167    } else {
    168168        $subdomain_error = false;
Note: See TracChangeset for help on using the changeset viewer.