var $mLinkHolders;
var $mLinkID;
- var $mIncludeSizes, $mPPNodeCount, $mDefaultSort;
+ var $mIncludeSizes, $mPPNodeCount, $mHighestExpansionDepth, $mDefaultSort;
var $mTplExpandCache; # empty-frame expansion cache
var $mTplRedirCache, $mTplDomCache, $mHeadings, $mDoubleUnderscores;
var $mExpensiveFunctionCount; # number of expensive parser function calls
'arg' => 0,
);
$this->mPPNodeCount = 0;
+ $this->mHighestExpansionDepth = 0;
$this->mDefaultSort = false;
$this->mHeadings = array();
$this->mDoubleUnderscores = array();
"Preprocessor node count: {$this->mPPNodeCount}/{$this->mOptions->getMaxPPNodeCount()}\n" .
"Post-expand include size: {$this->mIncludeSizes['post-expand']}/$max bytes\n" .
"Template argument size: {$this->mIncludeSizes['arg']}/$max bytes\n".
+ "Highest expansion depth: {$this->mHighestExpansionDepth}/{$this->mOptions->getMaxPPExpandDepth()}\n".
$PFreport;
wfRunHooks( 'ParserLimitReport', array( $this, &$limitReport ) );
$text .= "\n<!-- \n$limitReport-->\n";
}
wfProfileIn( __METHOD__ );
++$expansionDepth;
+ if ( $expansionDepth > $this->parser->mHighestExpansionDepth ) {
+ $this->parser->mHighestExpansionDepth = $expansionDepth;
+ }
if ( $root instanceof PPNode_DOM ) {
$root = $root->node;
return '<span class="error">Expansion depth limit exceeded</span>';
}
++$expansionDepth;
+ if ( $expansionDepth > $this->parser->mHighestExpansionDepth ) {
+ $this->parser->mHighestExpansionDepth = $expansionDepth;
+ }
$outStack = array( '', '' );
$iteratorStack = array( false, $root );
return '<span class="error">Expansion depth limit exceeded</span>';
}
++$expansionDepth;
+ if ( $expansionDepth > $this->parser->mHighestExpansionDepth ) {
+ $this->parser->mHighestExpansionDepth = $expansionDepth;
+ }
$outStack = array( '', '' );
$iteratorStack = array( false, $root );