Make WordPress Core


Ignore:
Timestamp:
07/01/2019 12:50:14 PM (6 years ago)
Author:
pento
Message:

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

See #47632.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/post.php

    r44726 r45583  
    2020    wp_die( __( 'A post ID mismatch has been detected.' ), __( 'Sorry, you are not allowed to edit this item.' ), 400 );
    2121} elseif ( isset( $_GET['post'] ) ) {
    22     $post_id = $post_ID = (int) $_GET['post'];
     22    $post_id = (int) $_GET['post'];
    2323} elseif ( isset( $_POST['post_ID'] ) ) {
    24     $post_id = $post_ID = (int) $_POST['post_ID'];
     24    $post_id = (int) $_POST['post_ID'];
    2525} else {
    26     $post_id = $post_ID = 0;
    27 }
     26    $post_id = 0;
     27}
     28$post_ID = $post_id;
    2829
    2930/**
     
    242243        }
    243244
    244         if ( $user_id = wp_check_post_lock( $post_id ) ) {
     245        $user_id = wp_check_post_lock( $post_id );
     246        if ( $user_id ) {
    245247            $user = get_userdata( $user_id );
    246248            wp_die( sprintf( __( 'You cannot move this item to the Trash. %s is currently editing.' ), $user->display_name ) );
Note: See TracChangeset for help on using the changeset viewer.