diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 8c56097333..fed6568af3 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -24,7 +24,13 @@ function get_comment_author( $comment_id = 0 ) { $comment = get_comment( $comment_id ); - $comment_id = ! empty( $comment->comment_ID ) ? $comment->comment_ID : (string) $comment_id; + if ( ! empty( $comment->comment_ID ) ) { + $comment_id = $comment->comment_ID; + } elseif ( is_scalar( $comment_id ) ) { + $comment_id = (string) $comment_id; + } else { + $comment_id = ''; + } if ( empty( $comment->comment_author ) ) { $user = ! empty( $comment->user_id ) ? get_userdata( $comment->user_id ) : false; diff --git a/wp-includes/version.php b/wp-includes/version.php index 215963486b..bf7657f5ba 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.6.1-alpha-58761'; +$wp_version = '6.6.1-alpha-58762'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.