Make WordPress Core

Changeset 56321 for trunk


Ignore:
Timestamp:
07/28/2023 11:35:17 AM (3 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict comparison in wp-includes/class-wp-roles.php.

Follow-up to [25695], [41625].

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-roles.php

    r54673 r56321  
    193193                }
    194194
    195                 if ( get_option( 'default_role' ) == $role ) {
     195                if ( get_option( 'default_role' ) === $role ) {
    196196                        update_option( 'default_role', 'subscriber' );
    197197                }
    … …  
    360360                }
    361361
    362                 if ( is_multisite() && get_current_blog_id() != $this->site_id ) {
     362                if ( is_multisite() && get_current_blog_id() !== $this->site_id ) {
    363363                        remove_action( 'switch_blog', 'wp_switch_roles_and_user', 1 );
    364364
Note: See TracChangeset for help on using the changeset viewer.