Make WordPress Core


Ignore:
Timestamp:
05/16/2020 06:40:52 PM (5 years 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-settings.php

    r47198 r47808  
    5656
    5757    $domain = strtolower( stripslashes( $_SERVER['HTTP_HOST'] ) );
    58     if ( substr( $domain, -3 ) == ':80' ) {
     58    if ( ':80' === substr( $domain, -3 ) ) {
    5959        $domain               = substr( $domain, 0, -3 );
    6060        $_SERVER['HTTP_HOST'] = substr( $_SERVER['HTTP_HOST'], 0, -3 );
    61     } elseif ( substr( $domain, -4 ) == ':443' ) {
     61    } elseif ( ':443' === substr( $domain, -4 ) ) {
    6262        $domain               = substr( $domain, 0, -4 );
    6363        $_SERVER['HTTP_HOST'] = substr( $_SERVER['HTTP_HOST'], 0, -4 );
Note: See TracChangeset for help on using the changeset viewer.