Make WordPress Core


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

    r45507 r45590  
    728728 */
    729729function author_can( $post, $capability ) {
    730     if ( ! $post = get_post( $post ) ) {
     730    $post = get_post( $post );
     731    if ( ! $post ) {
    731732        return false;
    732733    }
     
    967968    $user = get_userdata( $user_id );
    968969    if ( $user && 0 !== strcasecmp( $user->user_email, get_site_option( 'admin_email' ) ) ) {
    969         if ( false !== ( $key = array_search( $user->user_login, $super_admins ) ) ) {
     970        $key = array_search( $user->user_login, $super_admins );
     971        if ( false !== $key ) {
    970972            unset( $super_admins[ $key ] );
    971973            update_site_option( 'site_admins', $super_admins );
Note: See TracChangeset for help on using the changeset viewer.