Index: src/wp-includes/comment-template.php
===================================================================
--- src/wp-includes/comment-template.php	(revision 57566)
+++ src/wp-includes/comment-template.php	(working copy)
@@ -24,17 +24,19 @@
 function get_comment_author( $comment_id = 0 ) {
 	$comment = get_comment( $comment_id );
 
-	$comment_id = ! empty( $comment->comment_ID ) ? $comment->comment_ID : $comment_id;
+	$comment_id = ! empty( $comment->comment_ID ) ? $comment->comment_ID : (string) $comment_id;
 
-	if ( empty( $comment->comment_author ) ) {
-		$user = ! empty( $comment->user_id ) ? get_userdata( $comment->user_id ) : false;
-		if ( $user ) {
+	if ( $comment ) {
+		if ( $comment->comment_author ) {
+			$comment_author = $comment->comment_author;
+		} elseif ( ! empty( $comment->user_id ) ) {
+			$user = get_userdata( $comment->user_id );
 			$comment_author = $user->display_name;
 		} else {
 			$comment_author = __( 'Anonymous' );
 		}
 	} else {
-		$comment_author = $comment->comment_author;
+		$comment_author = '';
 	}
 
 	/**
@@ -43,9 +45,9 @@
 	 * @since 1.5.0
 	 * @since 4.1.0 The `$comment_id` and `$comment` parameters were added.
 	 *
-	 * @param string     $comment_author The comment author's username.
-	 * @param string     $comment_id     The comment ID as a numeric string.
-	 * @param WP_Comment $comment        The comment object.
+	 * @param string          $comment_author The comment author's username.
+	 * @param string          $comment_id     The comment ID as a numeric string.
+	 * @param WP_Comment|null $comment        The comment object.
 	 */
 	return apply_filters( 'get_comment_author', $comment_author, $comment_id, $comment );
 }
@@ -62,7 +64,9 @@
 function comment_author( $comment_id = 0 ) {
 	$comment = get_comment( $comment_id );
 
-	$comment_author = get_comment_author( $comment );
+	$comment_author = $comment ? get_comment_author( $comment ) : ''; 
+
+	$comment_id = ! empty( $comment->comment_ID ) ? $comment->comment_ID : (string) $comment_id; 
 
 	/**
 	 * Filters the comment author's name for display.
@@ -73,7 +77,7 @@
 	 * @param string $comment_author The comment author's username.
 	 * @param string $comment_id     The comment ID as a numeric string.
 	 */
-	echo apply_filters( 'comment_author', $comment_author, $comment->comment_ID );
+	echo apply_filters( 'comment_author', $comment_author, $comment_id ); 
 }
 
 /**
@@ -89,17 +93,21 @@
 function get_comment_author_email( $comment_id = 0 ) {
 	$comment = get_comment( $comment_id );
 
+	$comment_author_email = $comment ? $comment->comment_author_email : ''; 
+
+	$comment_id = ! empty( $comment->comment_ID ) ? $comment->comment_ID : (string) $comment_id; 
+
 	/**
 	 * Filters the comment author's returned email address.
 	 *
 	 * @since 1.5.0
 	 * @since 4.1.0 The `$comment_id` and `$comment` parameters were added.
 	 *
-	 * @param string     $comment_author_email The comment author's email address.
-	 * @param string     $comment_id           The comment ID as a numeric string.
-	 * @param WP_Comment $comment              The comment object.
+	 * @param string          $comment_author_email The comment author's email address.
+	 * @param string          $comment_id           The comment ID as a numeric string.
+	 * @param WP_Comment|null $comment              The comment object.
 	 */
-	return apply_filters( 'get_comment_author_email', $comment->comment_author_email, $comment->comment_ID, $comment );
+	return apply_filters( 'get_comment_author_email', $comment_author_email, $comment_id, $comment ); 
 }
 
 /**
@@ -120,7 +128,9 @@
 function comment_author_email( $comment_id = 0 ) {
 	$comment = get_comment( $comment_id );
 
-	$comment_author_email = get_comment_author_email( $comment );
+	$comment_author_email = $comment ? get_comment_author_email( $comment ) : ''; 
+
+	$comment_id = ! empty( $comment->comment_ID ) ? $comment->comment_ID : (string) $comment_id; 
 
 	/**
 	 * Filters the comment author's email for display.
@@ -131,7 +141,7 @@
 	 * @param string $comment_author_email The comment author's email address.
 	 * @param string $comment_id           The comment ID as a numeric string.
 	 */
-	echo apply_filters( 'author_email', $comment_author_email, $comment->comment_ID );
+	echo apply_filters( 'author_email', $comment_author_email, $comment_id ); 
 }
 
 /**
@@ -182,6 +192,8 @@
 function get_comment_author_email_link( $link_text = '', $before = '', $after = '', $comment = null ) {
 	$comment = get_comment( $comment );
 
+	$comment_author_email = $comment ? $comment->comment_author_email : ''; 
+
 	/**
 	 * Filters the comment author's email for display.
 	 *
@@ -191,13 +203,13 @@
 	 * @since 1.2.0
 	 * @since 4.1.0 The `$comment` parameter was added.
 	 *
-	 * @param string     $comment_author_email The comment author's email address.
-	 * @param WP_Comment $comment              The comment object.
+	 * @param string          $comment_author_email The comment author's email address.
+	 * @param WP_Comment|null $comment              The comment object.
 	 */
-	$comment_author_email = apply_filters( 'comment_email', $comment->comment_author_email, $comment );
+	$comment_author_email = apply_filters( 'comment_email', $comment_author_email, $comment ); 
 
-	if ( ( ! empty( $comment_author_email ) ) && ( '@' !== $comment_author_email ) ) {
-		$display = ( '' !== $link_text ) ? $link_text : $comment_author_email;
+	if ( $comment_author_email && ( '@' !== $comment_author_email ) ) { 
+		$display = $link_text ? $link_text : $comment_author_email; 
 
 		$comment_author_email_link = $before . sprintf(
 			'<a href="%1$s">%2$s</a>',
@@ -229,8 +241,8 @@
 
 	$comment_id = ! empty( $comment->comment_ID ) ? $comment->comment_ID : (string) $comment_id;
 
-	$comment_author_url = get_comment_author_url( $comment );
-	$comment_author     = get_comment_author( $comment );
+	$comment_author_url = $comment ? get_comment_author_url( $comment ) : ''; 
+	$comment_author     = $comment ? get_comment_author( $comment ) : ''; 
 
 	if ( empty( $comment_author_url ) || 'http://' === $comment_author_url ) {
 		$comment_author_link = $comment_author;
@@ -248,9 +260,9 @@
 		 *
 		 * @since 6.2.0
 		 *
-		 * @param string[]   $rel_parts An array of strings representing the rel tags
-		 *                              which will be joined into the anchor's rel attribute.
-		 * @param WP_Comment $comment   The comment object.
+		 * @param string[]        $rel_parts An array of strings representing the rel tags
+		 *                                   which will be joined into the anchor's rel attribute.
+		 * @param WP_Comment|null $comment   The comment object.
 		 */
 		$rel_parts = apply_filters( 'comment_author_link_rel', $rel_parts, $comment );
 
@@ -307,17 +319,21 @@
 function get_comment_author_IP( $comment_id = 0 ) { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
 	$comment = get_comment( $comment_id );
 
+	$comment_author_ip = $comment ? $comment->comment_author_IP : ''; 
+
+	$comment_id = ! empty( $comment->comment_ID ) ? $comment->comment_ID : (string) $comment_id; 
+
 	/**
 	 * Filters the comment author's returned IP address.
 	 *
 	 * @since 1.5.0
 	 * @since 4.1.0 The `$comment_id` and `$comment` parameters were added.
 	 *
-	 * @param string     $comment_author_ip The comment author's IP address, or an empty string if it's not available.
-	 * @param string     $comment_id        The comment ID as a numeric string.
-	 * @param WP_Comment $comment           The comment object.
+	 * @param string          $comment_author_ip The comment author's IP address, or an empty string if it's not available.
+	 * @param string          $comment_id        The comment ID as a numeric string.
+	 * @param WP_Comment|null $comment           The comment object.
 	 */
-	return apply_filters( 'get_comment_author_IP', $comment->comment_author_IP, $comment->comment_ID, $comment );  // phpcs:ignore WordPress.NamingConventions.ValidHookName.NotLowercase
+	return apply_filters( 'get_comment_author_IP', $comment_author_ip, $comment_id, $comment );  // phpcs:ignore WordPress.NamingConventions.ValidHookName.NotLowercase
 }
 
 /**
@@ -346,15 +362,14 @@
 function get_comment_author_url( $comment_id = 0 ) {
 	$comment = get_comment( $comment_id );
 
-	$comment_author_url = '';
-	$comment_id         = 0;
-
-	if ( ! empty( $comment ) ) {
-		$comment_author_url = ( 'http://' === $comment->comment_author_url ) ? '' : $comment->comment_author_url;
-		$comment_author_url = esc_url( $comment_author_url, array( 'http', 'https' ) );
+	
+	if ( $comment && 'http://' !== $comment->comment_author_url ) {
+		$comment_author_url = esc_url( $comment->comment_author_url, array( 'http', 'https' ) );
+	} else {
+		$comment_author_url = '';
+	} 
 
-		$comment_id = $comment->comment_ID;
-	}
+	$comment_id = ! empty( $comment->comment_ID ) ? $comment->comment_ID : (string) $comment_id; 
 
 	/**
 	 * Filters the comment author's URL.
@@ -366,7 +381,7 @@
 	 * @param string|int      $comment_id         The comment ID as a numeric string, or 0 if not found.
 	 * @param WP_Comment|null $comment            The comment object, or null if not found.
 	 */
-	return apply_filters( 'get_comment_author_url', $comment_author_url, $comment_id, $comment );
+	return apply_filters( 'get_comment_author_url', $comment_author_url, $comment_id, $comment ); 
 }
 
 /**
@@ -381,7 +396,9 @@
 function comment_author_url( $comment_id = 0 ) {
 	$comment = get_comment( $comment_id );
 
-	$comment_author_url = get_comment_author_url( $comment );
+	$comment_author_url = $comment ? get_comment_author_url( $comment ) : ''; 
+
+	$comment_id = ! empty( $comment->comment_ID ) ? $comment->comment_ID : (string) $comment_id; 
 
 	/**
 	 * Filters the comment author's URL for display.
@@ -392,7 +409,7 @@
 	 * @param string $comment_author_url The comment author's URL.
 	 * @param string $comment_id         The comment ID as a numeric string.
 	 */
-	echo apply_filters( 'comment_url', $comment_author_url, $comment->comment_ID );
+	echo apply_filters( 'comment_url', $comment_author_url, $comment_id ); 
 }
 
 /**
@@ -421,7 +438,7 @@
 function get_comment_author_url_link( $link_text = '', $before = '', $after = '', $comment = 0 ) {
 	$comment_author_url = get_comment_author_url( $comment );
 
-	$display = ( '' !== $link_text ) ? $link_text : $comment_author_url;
+	$display = $link_text ? $link_text : $comment_author_url; 
 	$display = str_replace( 'http://www.', '', $display );
 	$display = str_replace( 'http://', '', $display );
 
@@ -603,16 +620,16 @@
 
 	$_format = ! empty( $format ) ? $format : get_option( 'date_format' );
 
-	$comment_date = mysql2date( $_format, $comment->comment_date );
+	$comment_date = $comment ? mysql2date( $_format, $comment->comment_date ) : ''; 
 
 	/**
 	 * Filters the returned comment date.
 	 *
 	 * @since 1.5.0
 	 *
-	 * @param string|int $comment_date Formatted date string or Unix timestamp.
-	 * @param string     $format       PHP date format.
-	 * @param WP_Comment $comment      The comment object.
+	 * @param string|int      $comment_date Formatted date string or Unix timestamp.
+	 * @param string          $format       PHP date format.
+	 * @param WP_Comment|null $comment      The comment object.
 	 */
 	return apply_filters( 'get_comment_date', $comment_date, $format, $comment );
 }
@@ -646,8 +663,12 @@
 function get_comment_excerpt( $comment_id = 0 ) {
 	$comment = get_comment( $comment_id );
 
+	$comment_text = $comment ? $comment->comment_content : ''; 
+
+	$comment_id = ! empty( $comment->comment_ID ) ? $comment->comment_ID : (string) $comment_id; 
+
 	if ( ! post_password_required( $comment->comment_post_ID ) ) {
-		$comment_text = strip_tags( str_replace( array( "\n", "\r" ), ' ', $comment->comment_content ) );
+		$comment_text = strip_tags( str_replace( array( "\n", "\r" ), ' ', $comment_text ) ); 
 	} else {
 		$comment_text = __( 'Password protected' );
 	}
@@ -672,11 +693,11 @@
 	 * @since 1.5.0
 	 * @since 4.1.0 The `$comment_id` and `$comment` parameters were added.
 	 *
-	 * @param string     $comment_excerpt The comment excerpt text.
-	 * @param string     $comment_id      The comment ID as a numeric string.
-	 * @param WP_Comment $comment         The comment object.
+	 * @param string          $comment_excerpt The comment excerpt text.
+	 * @param string          $comment_id      The comment ID as a numeric string.
+	 * @param WP_Comment|null $comment         The comment object.
 	 */
-	return apply_filters( 'get_comment_excerpt', $comment_excerpt, $comment->comment_ID, $comment );
+	return apply_filters( 'get_comment_excerpt', $comment_excerpt, $comment_id, $comment ); 
 }
 
 /**
@@ -691,7 +712,9 @@
 function comment_excerpt( $comment_id = 0 ) {
 	$comment = get_comment( $comment_id );
 
-	$comment_excerpt = get_comment_excerpt( $comment );
+	$comment_excerpt = $comment ? get_comment_excerpt( $comment ) : ''; 
+
+	$comment_id = ! empty( $comment->comment_ID ) ? $comment->comment_ID : (string) $comment_id; 
 
 	/**
 	 * Filters the comment excerpt for display.
@@ -702,7 +725,7 @@
 	 * @param string $comment_excerpt The comment excerpt text.
 	 * @param string $comment_id      The comment ID as a numeric string.
 	 */
-	echo apply_filters( 'comment_excerpt', $comment_excerpt, $comment->comment_ID );
+	echo apply_filters( 'comment_excerpt', $comment_excerpt, $comment_id ); 
 }
 
 /**
@@ -715,7 +738,7 @@
 function get_comment_ID() { // phpcs:ignore WordPress.NamingConventions.ValidFunctionName.FunctionNameInvalid
 	$comment = get_comment();
 
-	$comment_id = ! empty( $comment->comment_ID ) ? $comment->comment_ID : '0';
+	$comment_id = ! empty( $comment->comment_ID ) ? $comment->comment_ID : '0'; 
 
 	/**
 	 * Filters the returned comment ID.
@@ -723,8 +746,8 @@
 	 * @since 1.5.0
 	 * @since 4.1.0 The `$comment` parameter was added.
 	 *
-	 * @param string     $comment_id The current comment ID as a numeric string.
-	 * @param WP_Comment $comment    The comment object.
+	 * @param string          $comment_id The current comment ID as a numeric string.
+	 * @param WP_Comment|null $comment    The comment object.
 	 */
 	return apply_filters( 'get_comment_ID', $comment_id, $comment );  // phpcs:ignore WordPress.NamingConventions.ValidHookName.NotLowercase
 }
@@ -783,7 +806,7 @@
 
 	$args = wp_parse_args( $args, $defaults );
 
-	$comment_link = get_permalink( $comment->comment_post_ID );
+	$comment_link = $comment ? get_permalink( $comment->comment_post_ID ) : ''; 
 
 	// The 'cpage' param takes precedence.
 	if ( ! is_null( $args['cpage'] ) ) {
@@ -807,7 +830,7 @@
 				$cpage = get_query_var( 'cpage' );
 			} else {
 				// Requires a database hit, so we only do it when we can't figure out from context.
-				$cpage = get_page_of_comment( $comment->comment_ID, $args );
+				$cpage = $comment ? get_page_of_comment( $comment->comment_ID, $args ) : 0; 
 			}
 		}
 
@@ -836,7 +859,7 @@
 		$comment_link = user_trailingslashit( $comment_link, 'comment' );
 	}
 
-	$comment_link = $comment_link . '#comment-' . $comment->comment_ID;
+	$comment_link = ( $comment_link ) ? $comment_link . '#comment-' . $comment->comment_ID : ''; 
 
 	/**
 	 * Filters the returned single comment permalink.
@@ -846,10 +869,10 @@
 	 *
 	 * @see get_page_of_comment()
 	 *
-	 * @param string     $comment_link The comment permalink with '#comment-$id' appended.
-	 * @param WP_Comment $comment      The current comment object.
-	 * @param array      $args         An array of arguments to override the defaults.
-	 * @param int        $cpage        The calculated 'cpage' value.
+	 * @param string          $comment_link The comment permalink with '#comment-$id' appended.
+	 * @param WP_Comment|null $comment      The current comment object.
+	 * @param array           $args         An array of arguments to override the defaults.
+	 * @param int             $cpage        The calculated 'cpage' value.
 	 */
 	return apply_filters( 'get_comment_link', $comment_link, $comment, $args, $cpage );
 }
@@ -1021,9 +1044,9 @@
 function get_comment_text( $comment_id = 0, $args = array() ) {
 	$comment = get_comment( $comment_id );
 
-	$comment_text = $comment->comment_content;
+	$comment_text = $comment ? $comment->comment_content : ''; 
 
-	if ( is_comment_feed() && $comment->comment_parent ) {
+	if ( is_comment_feed() && ! empty( $comment->comment_parent ) ) { 
 		$parent = get_comment( $comment->comment_parent );
 		if ( $parent ) {
 			$parent_link = esc_url( get_comment_link( $parent ) );
@@ -1044,9 +1067,9 @@
 	 *
 	 * @see Walker_Comment::comment()
 	 *
-	 * @param string     $comment_text Text of the comment.
-	 * @param WP_Comment $comment      The comment object.
-	 * @param array      $args         An array of arguments.
+	 * @param string          $comment_text Text of the comment.
+	 * @param WP_Comment|null $comment      The comment object.
+	 * @param array           $args         An array of arguments.
 	 */
 	return apply_filters( 'get_comment_text', $comment_text, $comment, $args );
 }
@@ -1066,7 +1089,7 @@
 function comment_text( $comment_id = 0, $args = array() ) {
 	$comment = get_comment( $comment_id );
 
-	$comment_text = get_comment_text( $comment, $args );
+	$comment_text = $comment ? get_comment_text( $comment, $args ) : ''; 
 
 	/**
 	 * Filters the text of a comment to be displayed.
@@ -1099,26 +1122,27 @@
 function get_comment_time( $format = '', $gmt = false, $translate = true, $comment_id = 0 ) {
 	$comment = get_comment( $comment_id );
 
-	if ( null === $comment ) {
-		return '';
-	}
-
-	$comment_date = $gmt ? $comment->comment_date_gmt : $comment->comment_date;
+	
+	if ( $comment ) {
+		$comment_date = $gmt ? $comment->comment_date_gmt : $comment->comment_date;
 
-	$_format = ! empty( $format ) ? $format : get_option( 'time_format' );
+		$_format = ! empty( $format ) ? $format : get_option( 'time_format' );
 
-	$comment_time = mysql2date( $_format, $comment_date, $translate );
+		$comment_time = mysql2date( $_format, $comment_date, $translate );
+	} else {
+		$comment_time = '';
+	} 
 
 	/**
 	 * Filters the returned comment time.
 	 *
 	 * @since 1.5.0
 	 *
-	 * @param string|int $comment_time The comment time, formatted as a date string or Unix timestamp.
-	 * @param string     $format       PHP date format.
-	 * @param bool       $gmt          Whether the GMT date is in use.
-	 * @param bool       $translate    Whether the time is translated.
-	 * @param WP_Comment $comment      The comment object.
+	 * @param string|int      $comment_time The comment time, formatted as a date string or Unix timestamp.
+	 * @param string          $format       PHP date format.
+	 * @param bool            $gmt          Whether the GMT date is in use.
+	 * @param bool            $translate    Whether the time is translated.
+	 * @param WP_Comment|null $comment      The comment object.
 	 */
 	return apply_filters( 'get_comment_time', $comment_time, $format, $gmt, $translate, $comment );
 }
@@ -1150,9 +1174,14 @@
 function get_comment_type( $comment_id = 0 ) {
 	$comment = get_comment( $comment_id );
 
-	if ( '' === $comment->comment_type ) {
-		$comment->comment_type = 'comment';
-	}
+	
+	if ( $comment ) {
+		$comment_type = $comment->comment_type ? $comment->comment_type : 'comment';
+	} else {
+		$comment_type = '';
+	} 
+
+	$comment_id = ! empty( $comment->comment_ID ) ? $comment->comment_ID : (string) $comment_id; 
 
 	/**
 	 * Filters the returned comment type.
@@ -1160,11 +1189,11 @@
 	 * @since 1.5.0
 	 * @since 4.1.0 The `$comment_id` and `$comment` parameters were added.
 	 *
-	 * @param string     $comment_type The type of comment, such as 'comment', 'pingback', or 'trackback'.
-	 * @param string     $comment_id   The comment ID as a numeric string.
-	 * @param WP_Comment $comment      The comment object.
+	 * @param string          $comment_type The type of comment, such as 'comment', 'pingback', or 'trackback'. Empty string for non-existent comment.
+	 * @param string          $comment_id   The comment ID as a numeric string.
+	 * @param WP_Comment|null $comment      The comment object.
 	 */
-	return apply_filters( 'get_comment_type', $comment->comment_type, $comment->comment_ID, $comment );
+	return apply_filters( 'get_comment_type', $comment_type, $comment_id, $comment ); 
 }
 
 /**
@@ -1763,35 +1792,25 @@
 
 	$comment = get_comment( $comment );
 
-	if ( empty( $comment ) ) {
-		return;
-	}
-
-	if ( empty( $post ) ) {
+	if ( ! $post && $comment ) { 
 		$post = $comment->comment_post_ID;
 	}
 
 	$post = get_post( $post );
 
-	if ( ! comments_open( $post->ID ) ) {
+	if ( $post && ! comments_open( $post->ID ) ) { 
 		return false;
 	}
 
-	if ( get_option( 'page_comments' ) ) {
-		$permalink = str_replace( '#comment-' . $comment->comment_ID, '', get_comment_link( $comment ) );
-	} else {
-		$permalink = get_permalink( $post->ID );
-	}
-
 	/**
 	 * Filters the comment reply link arguments.
 	 *
 	 * @since 4.1.0
 	 *
-	 * @param array      $args    Comment reply link arguments. See get_comment_reply_link()
-	 *                            for more information on accepted arguments.
-	 * @param WP_Comment $comment The object of the comment being replied to.
-	 * @param WP_Post    $post    The WP_Post object.
+	 * @param array           $args    Comment reply link arguments. See get_comment_reply_link()
+	 *                                 for more information on accepted arguments.
+	 * @param WP_Comment|null $comment The object of the comment being replied to.
+	 * @param WP_Post         $post    The WP_Post object.
 	 */
 	$args = apply_filters( 'comment_reply_link_args', $args, $comment, $post );
 
@@ -1801,7 +1820,7 @@
 			esc_url( wp_login_url( get_permalink() ) ),
 			$args['login_text']
 		);
-	} else {
+	} elseif ( $comment ) { 
 		$data_attributes = array(
 			'commentid'      => $comment->comment_ID,
 			'postid'         => $post->ID,
@@ -1818,6 +1837,13 @@
 
 		$data_attribute_string = trim( $data_attribute_string );
 
+		
+		if ( get_option( 'page_comments' ) ) {
+			$permalink = str_replace( '#comment-' . $comment->comment_ID, '', get_comment_link( $comment ) );
+		} else {
+			$permalink = $post ? get_permalink( $post->ID ) : '';
+		} 
+
 		$link = sprintf(
 			"<a rel='nofollow' class='comment-reply-link' href='%s' %s aria-label='%s'>%s</a>",
 			esc_url(
@@ -1834,7 +1860,9 @@
 			esc_attr( sprintf( $args['reply_to_text'], get_comment_author( $comment ) ) ),
 			$args['reply_text']
 		);
-	}
+	} else { 
+		$link = '';
+	} 
 
 	$comment_reply_link = $args['before'] . $link . $args['after'];
 
@@ -1843,10 +1871,10 @@
 	 *
 	 * @since 2.7.0
 	 *
-	 * @param string     $comment_reply_link The HTML markup for the comment reply link.
-	 * @param array      $args               An array of arguments overriding the defaults.
-	 * @param WP_Comment $comment            The object of the comment being replied.
-	 * @param WP_Post    $post               The WP_Post object.
+	 * @param string          $comment_reply_link The HTML markup for the comment reply link.
+	 * @param array           $args               An array of arguments overriding the defaults.
+	 * @param WP_Comment|null $comment            The object of the comment being replied.
+	 * @param WP_Post         $post               The WP_Post object.
 	 */
 	return apply_filters( 'comment_reply_link', $comment_reply_link, $args, $comment, $post );
 }
Index: tests/phpunit/tests/comment/getCommentExcerpt.php
===================================================================
--- tests/phpunit/tests/comment/getCommentExcerpt.php	(revision 57566)
+++ tests/phpunit/tests/comment/getCommentExcerpt.php	(working copy)
@@ -24,6 +24,14 @@
 		$this->assertCount( 20, explode( ' ', $excerpt ) );
 	}
 
+	public function test_get_comment_excerpt_with_non_existing_id() {
+		$comment_id = self::factory()->comment->create( array(
+			'comment_content' => self::$bacon_comment
+		) );
+
+		$this->assertEquals( '', get_comment_excerpt( -1 ) );
+	}
+
 	public function test_get_comment_excerpt_filtered() {
 		$comment_id = self::factory()->comment->create(
 			array(
Index: tests/phpunit/tests/comment/getCommentReplyLink.php
===================================================================
--- tests/phpunit/tests/comment/getCommentReplyLink.php	(revision 57566)
+++ tests/phpunit/tests/comment/getCommentReplyLink.php	(working copy)
@@ -72,7 +72,7 @@
 	/**
 	 * @ticket 41846
 	 */
-	public function test_should_return_null_when_depth_less_than_max_depth_and_comment_null_and_no_current_global_comment() {
+	public function test_should_return_empty_string_when_depth_less_than_max_depth_and_comment_null_and_no_current_global_comment() {
 
 		// Let max depth be greater than depth and depth be non-zero.
 		$args = array(
@@ -85,6 +85,6 @@
 
 		$actual = get_comment_reply_link( $args );
 
-		$this->assertNull( $actual );
+		$this->assertEquals( '', $actual );
 	}
 }
