Make WordPress Core


Ignore:
Timestamp:
04/09/2020 03:41:04 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Use strict type check for in_array() and array_search().

This addresses all the remaining WordPress.PHP.StrictInArray.MissingTrueStrict issues in core.

Includes minor code layout fixes for better readability.

Follow-up to [47550].

See #49542.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-ms-users-list-table.php

    r47550 r47557  
    506506        }
    507507
    508         if ( current_user_can( 'delete_user', $user->ID ) && ! in_array( $user->user_login, $super_admins ) ) {
     508        if ( current_user_can( 'delete_user', $user->ID ) && ! in_array( $user->user_login, $super_admins, true ) ) {
    509509            $actions['delete'] = '<a href="' . esc_url( network_admin_url( add_query_arg( '_wp_http_referer', urlencode( wp_unslash( $_SERVER['REQUEST_URI'] ) ), wp_nonce_url( 'users.php', 'deleteuser' ) . '&amp;action=deleteuser&amp;id=' . $user->ID ) ) ) . '" class="delete">' . __( 'Delete' ) . '</a>';
    510510        }
Note: See TracChangeset for help on using the changeset viewer.