Skip to content

Commit

Permalink
Coding Standards: Use strict comparison in wp-includes/ms-load.php.
Browse files Browse the repository at this point in the history
Follow-up to [12602], [12688], [12896], [27359], [37475].

Props aristath, poena, afercia, SergeyBiryukov.
See #60700.

git-svn-id: https://develop.svn.wordpress.org/trunk@57877 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
SergeyBiryukov committed Mar 25, 2024
1 parent e73db80 commit 4366183
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/wp-includes/ms-load.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ function ms_site_check() {

$blog = get_site();

if ( '1' == $blog->deleted ) {
if ( '1' === $blog->deleted ) {
if ( file_exists( WP_CONTENT_DIR . '/blog-deleted.php' ) ) {
return WP_CONTENT_DIR . '/blog-deleted.php';
} else {
wp_die( __( 'This site is no longer available.' ), '', array( 'response' => 410 ) );
}
}

if ( '2' == $blog->deleted ) {
if ( '2' === $blog->deleted ) {
if ( file_exists( WP_CONTENT_DIR . '/blog-inactive.php' ) ) {
return WP_CONTENT_DIR . '/blog-inactive.php';
} else {
Expand All @@ -115,7 +115,7 @@ function ms_site_check() {
}
}

if ( '1' == $blog->archived || '1' == $blog->spam ) {
if ( '1' === $blog->archived || '1' === $blog->spam ) {
if ( file_exists( WP_CONTENT_DIR . '/blog-suspended.php' ) ) {
return WP_CONTENT_DIR . '/blog-suspended.php';
} else {
Expand Down Expand Up @@ -377,7 +377,7 @@ function ms_load_current_site_and_network( $domain, $path, $subdomain = false )
}

// The network declared by the site trumps any constants.
if ( $current_blog && $current_blog->site_id != $current_site->id ) {
if ( $current_blog && (int) $current_blog->site_id !== $current_site->id ) {
$current_site = WP_Network::get_instance( $current_blog->site_id );
}

Expand Down

0 comments on commit 4366183

Please sign in to comment.