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/async-upload.php

    r44331 r45583  
    4040
    4141// just fetch the detail form for that attachment
    42 if ( isset( $_REQUEST['attachment_id'] ) && ( $id = intval( $_REQUEST['attachment_id'] ) ) && $_REQUEST['fetch'] ) {
     42if ( isset( $_REQUEST['attachment_id'] ) && intval( $_REQUEST['attachment_id'] ) && $_REQUEST['fetch'] ) {
     43    $id   = intval( $_REQUEST['attachment_id'] );
    4344    $post = get_post( $id );
    4445    if ( 'attachment' != $post->post_type ) {
     
    5152    switch ( $_REQUEST['fetch'] ) {
    5253        case 3:
    53             if ( $thumb_url = wp_get_attachment_image_src( $id, 'thumbnail', true ) ) {
     54            $thumb_url = wp_get_attachment_image_src( $id, 'thumbnail', true );
     55            if ( $thumb_url ) {
    5456                echo '<img class="pinkynail" src="' . esc_url( $thumb_url[0] ) . '" alt="" />';
    5557            }
Note: See TracChangeset for help on using the changeset viewer.