/**
* Recursion depth of this frame, top = 0
+ * Note that this is NOT the same as expansion depth in expand()
*/
var $depth;
}
function expand( $root, $flags = 0 ) {
- static $depth = 0;
+ static $expansionDepth = 0;
if ( is_string( $root ) ) {
return $root;
}
return '<span class="error">Node-count limit exceeded</span>';
}
- if ( $depth > $this->parser->mOptions->mMaxPPExpandDepth ) {
+ if ( $expansionDepth > $this->parser->mOptions->mMaxPPExpandDepth ) {
return '<span class="error">Expansion depth limit exceeded</span>';
}
- ++$depth;
+ ++$expansionDepth;
if ( $root instanceof PPNode_DOM ) {
$root = $root->node;
}
}
}
- --$depth;
+ --$expansionDepth;
wfProfileOut( __METHOD__ );
return $outStack[0];
}
/**
* Recursion depth of this frame, top = 0
+ * Note that this is NOT the same as expansion depth in expand()
*/
var $depth;
}
function expand( $root, $flags = 0 ) {
+ static $expansionDepth = 0;
if ( is_string( $root ) ) {
return $root;
}
{
return '<span class="error">Node-count limit exceeded</span>';
}
- if ( $this->depth > $this->parser->mOptions->mMaxPPExpandDepth ) {
+ if ( $expansionDepth > $this->parser->mOptions->mMaxPPExpandDepth ) {
return '<span class="error">Expansion depth limit exceeded</span>';
}
- ++$this->depth;
+ ++$expansionDepth;
$outStack = array( '', '' );
$iteratorStack = array( false, $root );
}
}
}
- --$this->depth;
+ --$expansionDepth;
return $outStack[0];
}