WordPress.org

Make WordPress Core

Ticket #4529: 4529.notices.patch

File 4529.notices.patch, 649 bytes (added by Viper007Bond, 6 years ago)

Fix a notice on the edit comment screen

  • wp-admin/comment.php

     
    4444        if ( !current_user_can('edit_post', $comment->comment_post_ID) ) 
    4545                comment_footer_die( __('You are not allowed to edit comments on this post.') ); 
    4646 
    47         if ( 'trash' == $comment->comment_status ) 
     47        if ( !empty($comment->comment_status) && 'trash' == $comment->comment_status ) 
    4848                comment_footer_die( __('This comment is in the Trash. Please move it out of the Trash if you want to edit it.') ); 
    4949         
    5050        $comment = get_comment_to_edit( $comment_id );