Fix wrong return value in Preprocessor::getChildrenOfType
[lhc/web/wiklou.git] / includes / parser / Preprocessor_HipHop.hphp
index d7b0716..4ef5ca9 100644 (file)
@@ -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;