From ecf4b81d72e50b327b57fc28f8e32e4387f4b27d Mon Sep 17 00:00:00 2001 From: Boone Gorges Date: Sat, 26 Sep 2015 14:40:15 +0000 Subject: [PATCH] Use correct property name when setting child comments. This fixes a typo from [34546], uncovered by unrelated changes in [34583]. See #8071, #27571. git-svn-id: https://develop.svn.wordpress.org/trunk@34595 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/class-wp-comment.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wp-includes/class-wp-comment.php b/src/wp-includes/class-wp-comment.php index 6f2c771899..c141c6ecd9 100644 --- a/src/wp-includes/class-wp-comment.php +++ b/src/wp-includes/class-wp-comment.php @@ -301,7 +301,7 @@ final class WP_Comment { * @param WP_Comment $child Child comment. */ public function add_child( WP_Comment $child ) { - $this->comments[ $child->comment_ID ] = $child; + $this->children[ $child->comment_ID ] = $child; } /** @@ -314,8 +314,8 @@ final class WP_Comment { * @return WP_Comment|bool Returns the comment object if found, otherwise false. */ public function get_child( $child_id ) { - if ( isset( $this->comments[ $child_id ] ) ) { - return $this->comments[ $child_id ]; + if ( isset( $this->children[ $child_id ] ) ) { + return $this->children[ $child_id ]; } return false;