From 91c3d5c6c581dc21adb0db5038626bc526927011 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Sun, 5 Aug 2012 22:14:45 +0200 Subject: [PATCH] Fix wrong return value in Preprocessor::getChildrenOfType I am not sure, but this looks wrong, because it adds the type to the array and not the child. This method is unused in core and wmf extensions, maybe removing/deprecating is a better idea, but I am not sure, if that is possible. I have only see this possible error, while looking through the preprocessor. Change-Id: I5b7492d455989a8a3e71b5db6d31091b986c502a --- includes/parser/Preprocessor_Hash.php | 2 +- includes/parser/Preprocessor_HipHop.hphp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/parser/Preprocessor_Hash.php b/includes/parser/Preprocessor_Hash.php index 0e202fd61b..9296e3f10f 100644 --- a/includes/parser/Preprocessor_Hash.php +++ b/includes/parser/Preprocessor_Hash.php @@ -1574,7 +1574,7 @@ class PPNode_Hash_Tree implements PPNode { $children = array(); for ( $child = $this->firstChild; $child; $child = $child->nextSibling ) { if ( isset( $child->name ) && $child->name === $name ) { - $children[] = $name; + $children[] = $child; } } return $children; diff --git a/includes/parser/Preprocessor_HipHop.hphp b/includes/parser/Preprocessor_HipHop.hphp index d7b07162d6..4ef5ca9e4d 100644 --- a/includes/parser/Preprocessor_HipHop.hphp +++ b/includes/parser/Preprocessor_HipHop.hphp @@ -1758,7 +1758,7 @@ class PPNode_HipHop_Tree implements PPNode { $children = array(); for ( $child = $this->firstChild; $child; $child = $child->nextSibling ) { if ( isset( $child->name ) && $child->name === $name ) { - $children[] = $name; + $children[] = $child; } } return $children; -- 2.20.1