WordPress.org

Make WordPress Core


Ignore:
Timestamp:
07/02/2019 11:41:16 PM (15 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/option.php

    r45443 r45590  
    199199
    200200    if ( ! $alloptions ) {
    201         $suppress = $wpdb->suppress_errors();
    202         if ( ! $alloptions_db = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options WHERE autoload = 'yes'" ) ) {
     201        $suppress      = $wpdb->suppress_errors();
     202        $alloptions_db = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options WHERE autoload = 'yes'" );
     203        if ( ! $alloptions_db ) {
    203204            $alloptions_db = $wpdb->get_results( "SELECT option_name, option_value FROM $wpdb->options" );
    204205        }
     
    914915    }
    915916
    916     if ( ! $user_id = get_current_user_id() ) {
     917    $user_id = get_current_user_id();
     918    if ( ! $user_id ) {
    917919        return;
    918920    }
     
    10361038    global $_updated_user_settings;
    10371039
    1038     if ( ! $user_id = get_current_user_id() ) {
     1040    $user_id = get_current_user_id();
     1041    if ( ! $user_id ) {
    10391042        return array();
    10401043    }
     
    10791082    global $_updated_user_settings;
    10801083
    1081     if ( ! $user_id = get_current_user_id() ) {
     1084    $user_id = get_current_user_id();
     1085    if ( ! $user_id ) {
    10821086        return false;
    10831087    }
     
    11121116 */
    11131117function delete_all_user_settings() {
    1114     if ( ! $user_id = get_current_user_id() ) {
     1118    $user_id = get_current_user_id();
     1119    if ( ! $user_id ) {
    11151120        return;
    11161121    }
Note: See TracChangeset for help on using the changeset viewer.