From d44c6e5fda9eefd8a01ee2e2808410208736f491 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Fri, 28 Jul 2023 11:35:17 +0000 Subject: [PATCH] Coding Standards: Use strict comparison in `wp-includes/class-wp-roles.php`. Follow-up to [25695], [41625]. Props aristath, poena, afercia, SergeyBiryukov. See #58831. git-svn-id: https://develop.svn.wordpress.org/trunk@56321 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-roles.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/class-wp-roles.php b/src/wp-includes/class-wp-roles.php index f224250fa2..245aa2b05a 100644 --- a/src/wp-includes/class-wp-roles.php +++ b/src/wp-includes/class-wp-roles.php @@ -192,7 +192,7 @@ class WP_Roles { update_option( $this->role_key, $this->roles ); } - if ( get_option( 'default_role' ) == $role ) { + if ( get_option( 'default_role' ) === $role ) { update_option( 'default_role', 'subscriber' ); } } @@ -359,7 +359,7 @@ class WP_Roles { return $wp_user_roles; } - if ( is_multisite() && get_current_blog_id() != $this->site_id ) { + if ( is_multisite() && get_current_blog_id() !== $this->site_id ) { remove_action( 'switch_blog', 'wp_switch_roles_and_user', 1 ); $roles = get_blog_option( $this->site_id, $this->role_key, array() );