WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/02/2019 11:41:16 PM (13 months ago)
Author:
pento
Message:

Coding Standards: Fix the Squiz.PHP.DisallowMultipleAssignments violations in wp-includes.

See #47632.

File:
1 edited

Legend:

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

    r45419 r45590  
    234234
    235235        if ( false !== $user_id ) {
    236             if ( $user = wp_cache_get( $user_id, 'users' ) ) {
     236            $user = wp_cache_get( $user_id, 'users' );
     237            if ( $user ) {
    237238                return $user;
    238239            }
    239240        }
    240241
    241         if ( ! $user = $wpdb->get_row(
     242        $user = $wpdb->get_row(
    242243            $wpdb->prepare(
    243244                "SELECT * FROM $wpdb->users WHERE $db_field = %s LIMIT 1",
    244245                $value
    245246            )
    246         ) ) {
     247        );
     248        if ( ! $user ) {
    247249            return false;
    248250        }
Note: See TracChangeset for help on using the changeset viewer.