From 01121c3440042ee3cd126ac0fe81d085300375d7 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 2 Jun 2023 12:40:22 +0000 Subject: [PATCH] Coding Standards: Use strict comparison in `wp-admin/network/sites.php`. Follow-up to [12603], [18562], [55676]. Props aristath, poena, afercia, SergeyBiryukov. See #57839. Built from https://develop.svn.wordpress.org/trunk@55876 git-svn-id: http://core.svn.wordpress.org/trunk@55388 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/network/sites.php | 10 +++++++--- wp-includes/version.php | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/wp-admin/network/sites.php b/wp-admin/network/sites.php index 09ab513cef..21bfab9c42 100644 --- a/wp-admin/network/sites.php +++ b/wp-admin/network/sites.php @@ -142,7 +142,7 @@ if ( isset( $_GET['action'] ) ) { } $updated_action = 'not_deleted'; - if ( '0' != $id && ! is_main_site( $id ) && current_user_can( 'delete_site', $id ) ) { + if ( 0 !== $id && ! is_main_site( $id ) && current_user_can( 'delete_site', $id ) ) { wpmu_delete_blog( $id, true ); $updated_action = 'delete'; } @@ -182,7 +182,9 @@ if ( isset( $_GET['action'] ) ) { $doaction = $_POST['action']; foreach ( (array) $_POST['allblogs'] as $site_id ) { - if ( '0' != $site_id && ! is_main_site( $site_id ) ) { + $site_id = (int) $site_id; + + if ( 0 !== $site_id && ! is_main_site( $site_id ) ) { switch ( $doaction ) { case 'delete': require_once ABSPATH . 'wp-admin/admin-header.php'; @@ -197,12 +199,14 @@ if ( isset( $_GET['action'] ) ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index 14714891bb..ca9f36c200 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.3-alpha-55875'; +$wp_version = '6.3-alpha-55876'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.