Ticket #20625: 20625.diff

File 20625.diff, 760 bytes (added by helenyhou, 13 months ago)
  • wp-admin/media.php

     
    5959        $att = get_post($att_id); 
    6060 
    6161        if ( empty($att->ID) ) wp_die( __('You attempted to edit an attachment that doesn’t exist. Perhaps it was deleted?') ); 
     62        if ( 'attachment' !== $att->post_type ) wp_die( __('You attempted to edit an item that isn’t an attachment. Please go back and try again.') ); 
    6263        if ( $att->post_status == 'trash' ) wp_die( __('You can’t edit this attachment because it is in the Trash. Please move it out of the Trash and try again.') ); 
    6364 
    6465        add_filter('attachment_fields_to_edit', 'media_single_attachment_fields_to_edit', 10, 2);