diff --git a/src/wp-admin/includes/class-wp-comments-list-table.php b/src/wp-admin/includes/class-wp-comments-list-table.php index e8082bbb16..d8845e8eb9 100644 --- a/src/wp-admin/includes/class-wp-comments-list-table.php +++ b/src/wp-admin/includes/class-wp-comments-list-table.php @@ -448,13 +448,16 @@ class WP_Comments_List_Table extends WP_List_Table { } $the_comment_class = join( ' ', get_comment_class( $the_comment_class, $comment, $comment->comment_post_ID ) ); - $post = get_post( $comment->comment_post_ID ); - + if ( $comment->comment_post_ID > 0 ) { + $post = get_post( $comment->comment_post_ID ); + } $this->user_can = current_user_can( 'edit_comment', $comment->comment_ID ); echo "