WordPress.org

Make WordPress Core

Ticket #11366: 11366_isset-check.diff

File 11366_isset-check.diff, 722 bytes (added by nacin, 8 years ago)
  • media.php

     
    12391239        }
    12401240
    12411241        $thumbnail = '';
    1242         if ( 'image' == $type && current_theme_supports( 'post-images' ) && get_post_image_id($_GET['post_id']) != $attachment_id )
     1242        if ( 'image' == $type && current_theme_supports( 'post-images' ) && isset( $_GET['post_id'] ) && get_post_image_id($_GET['post_id']) != $attachment_id )
    12431243                $thumbnail = "<a class='wp-post-thumbnail' href='#' onclick='WPSetAsThumbnail(\"$attachment_id\");return false;'>" . esc_html__( "Use as thumbnail" ) . "</a>";
    12441244
    12451245        if ( ( $send || $thumbnail || $delete ) && !isset($form_fields['buttons']) )