From d08f91f596a0757990c9c7f9eb754dcaaac7e434 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Mon, 18 Oct 2010 23:50:33 +0000 Subject: [PATCH] Per CR on r45418... Explicitally define $refers = array();, as it being in a loop is just slight confusing with the isset --- includes/parser/Parser.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 3a71a55608..1e2b3afef6 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -3767,6 +3767,7 @@ class Parser { $node = $root->getFirstChild(); $byteOffset = 0; $tocraw = array(); + $refers = array(); foreach ( $matches[3] as $headline ) { $isTemplate = false; @@ -3941,8 +3942,9 @@ class Parser { while ( $node && !$isTemplate ) { if ( $node->getName() === 'h' ) { $bits = $node->splitHeading(); - if ( $bits['i'] == $sectionIndex ) + if ( $bits['i'] == $sectionIndex ) { break; + } } $byteOffset += mb_strlen( $this->mStripState->unstripBoth( $frame->expand( $node, PPFrame::RECOVER_ORIG ) ) ); -- 2.20.1