diff --git a/wp-includes/class-wp-comment-query.php b/wp-includes/class-wp-comment-query.php index e185ceb40e..bbc6fe2d66 100644 --- a/wp-includes/class-wp-comment-query.php +++ b/wp-includes/class-wp-comment-query.php @@ -481,8 +481,7 @@ class WP_Comment_Query { $_comments = apply_filters_ref_array( 'the_comments', array( $_comments, &$this ) ); // Convert to WP_Comment instances. - array_walk( $_comments, 'get_comment' ); - $comments = $_comments; + $comments = array_map( 'get_comment', $_comments ); if ( $this->query_vars['hierarchical'] ) { $comments = $this->fill_descendants( $comments ); diff --git a/wp-includes/comment.php b/wp-includes/comment.php index 150acd6f1a..10e9d864ad 100644 --- a/wp-includes/comment.php +++ b/wp-includes/comment.php @@ -192,7 +192,7 @@ function get_approved_comments( $post_id, $args = array() ) { * respectively. Default OBJECT. * @return WP_Comment|array|null Depends on $output value. */ -function get_comment( &$comment = null, $output = OBJECT ) { +function get_comment( $comment = null, $output = OBJECT ) { if ( empty( $comment ) && isset( $GLOBALS['comment'] ) ) { $comment = $GLOBALS['comment']; } diff --git a/wp-includes/version.php b/wp-includes/version.php index feb53399cd..55f744315b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.6-alpha-48960'; +$wp_version = '5.6-alpha-48961'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.