diff --git a/src/wp-admin/includes/ms.php b/src/wp-admin/includes/ms.php
index 76af47f8af..ca3a87ca6e 100644
--- a/src/wp-admin/includes/ms.php
+++ b/src/wp-admin/includes/ms.php
@@ -67,7 +67,7 @@ function wpmu_delete_blog( $blog_id, $drop = false ) {
 	global $wpdb;
 
 	$switch = false;
-	if ( get_current_blog_id() != $blog_id ) {
+	if ( get_current_blog_id() !== (int) $blog_id ) {
 		$switch = true;
 		switch_to_blog( $blog_id );
 	}
@@ -82,7 +82,7 @@ function wpmu_delete_blog( $blog_id, $drop = false ) {
 	}
 
 	// Don't destroy the initial, main, or root blog.
-	if ( $drop && ( 1 == $blog_id || is_main_site( $blog_id ) || ( $blog->path == $current_network->path && $blog->domain == $current_network->domain ) ) ) {
+	if ( $drop && ( 1 === (int) $blog_id || is_main_site( $blog_id ) || ( $blog->path === $current_network->path && $blog->domain == $current_network->domain ) ) ) {
 		$drop = false;
 	}
 
@@ -702,7 +702,7 @@ function site_admin_notice() {
 		return;
 	}
 
-	if ( get_site_option( 'wpmu_upgrade_site' ) != $wp_db_version ) {
+	if ( get_site_option( 'wpmu_upgrade_site' ) !== $wp_db_version ) {
 		echo "<div class='update-nag notice notice-warning inline'>" . sprintf(
 			/* translators: %s: URL to Upgrade Network screen. */
 			__( 'Thank you for Updating! Please visit the <a href="%s">Upgrade Network</a> page to update all your sites.' ),
@@ -746,7 +746,7 @@ function avoid_blog_page_permalink_collision( $data, $postarr ) {
 		$post_name .= mt_rand( 1, 10 );
 		$c ++;
 	}
-	if ( $post_name != $data['post_name'] ) {
+	if ( $data['post_name'] !== $post_name ) {
 		$data['post_name'] = $post_name;
 	}
 	return $data;
@@ -769,14 +769,14 @@ function choose_primary_blog() {
 		<td>
 		<?php
 		$all_blogs    = get_blogs_of_user( get_current_user_id() );
-		$primary_blog = get_user_meta( get_current_user_id(), 'primary_blog', true );
+		$primary_blog = (int) get_user_meta( get_current_user_id(), 'primary_blog', true );
 		if ( count( $all_blogs ) > 1 ) {
 			$found = false;
 			?>
 			<select name="primary_blog" id="primary_blog">
 				<?php
 				foreach ( (array) $all_blogs as $blog ) {
-					if ( $primary_blog == $blog->userblog_id ) {
+					if ( $blog->userblog_id === $primary_blog ) {
 						$found = true;
 					}
 					?>
@@ -790,10 +790,10 @@ function choose_primary_blog() {
 				$blog = reset( $all_blogs );
 				update_user_meta( get_current_user_id(), 'primary_blog', $blog->userblog_id );
 			}
-		} elseif ( count( $all_blogs ) == 1 ) {
+		} elseif ( 1 === count( $all_blogs ) ) {
 			$blog = reset( $all_blogs );
 			echo esc_url( get_home_url( $blog->userblog_id ) );
-			if ( $primary_blog != $blog->userblog_id ) { // Set the primary blog again if it's out of sync with blog list.
+			if ( $blog->userblog_id !== $primary_blog ) { // Set the primary blog again if it's out of sync with blog list.
 				update_user_meta( get_current_user_id(), 'primary_blog', $blog->userblog_id );
 			}
 		} else {
@@ -818,7 +818,7 @@ function choose_primary_blog() {
  * @return bool True if network can be edited, otherwise false.
  */
 function can_edit_network( $network_id ) {
-	if ( get_current_network_id() == $network_id ) {
+	if ( get_current_network_id() === (int) $network_id ) {
 		$result = true;
 	} else {
 		$result = false;
@@ -878,7 +878,7 @@ function confirm_delete_users( $users ) {
 	<?php
 	$allusers = (array) $_POST['allusers'];
 	foreach ( $allusers as $user_id ) {
-		if ( '' !== $user_id && '0' != $user_id ) {
+		if ( '' !== $user_id && 0 !== (int) $user_id ) {
 			$delete_user = get_userdata( $user_id );
 
 			if ( ! current_user_can( 'delete_user', $delete_user->ID ) ) {
