diff --git a/src/wp-admin/edit-form-comment.php b/src/wp-admin/edit-form-comment.php index d63420e106..dda2615134 100644 --- a/src/wp-admin/edit-form-comment.php +++ b/src/wp-admin/edit-form-comment.php @@ -119,17 +119,19 @@ if ( current_user_can( 'edit_post', $post_id ) ) { comment_parent ) : $parent = get_comment( $comment->comment_parent ); - $parent_link = esc_url( get_comment_link( $comment->comment_parent ) ); - $name = get_comment_author( $parent->comment_ID ); -?> -
- + if ( $parent ) : + $parent_link = esc_url( get_comment_link( $comment->comment_parent ) ); + $name = get_comment_author( $parent->comment_ID ); + ?> + + comment_parent ) { $parent = get_comment( $comment->comment_parent ); - $parent_link = esc_url( get_comment_link( $parent ) ); - $name = get_comment_author( $parent ); - printf( ' | '.__( 'In reply to %2$s.' ), $parent_link, $name ); + if ( $parent ) { + $parent_link = esc_url( get_comment_link( $parent ) ); + $name = get_comment_author( $parent ); + printf( ' | '.__( 'In reply to %2$s.' ), $parent_link, $name ); + } } echo '';