Explicitally define $refers = array();, as it being in a loop is just slight confusing with the isset
$node = $root->getFirstChild();
$byteOffset = 0;
$tocraw = array();
+ $refers = array();
foreach ( $matches[3] as $headline ) {
$isTemplate = false;
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 ) ) );