Commit Preprocessor_DOM live hacks
authorSam Reed <reedy@users.mediawiki.org>
Mon, 1 Aug 2011 23:39:34 +0000 (23:39 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Mon, 1 Aug 2011 23:39:34 +0000 (23:39 +0000)
includes/parser/Preprocessor_DOM.php

index 48c2345..ecc5223 100644 (file)
@@ -956,12 +956,12 @@ class PPFrame_DOM implements PPFrame {
                        return $root;
                }
 
-               if ( ++$this->parser->mPPNodeCount > $this->parser->mOptions->getMaxPPNodeCount() )
+               if ( is_object( $this->parser->mOptions ) && ++$this->parser->mPPNodeCount > $this->parser->mOptions->getMaxPPNodeCount() )
                {
                        return '<span class="error">Node-count limit exceeded</span>';
                }
 
-               if ( $expansionDepth > $this->parser->mOptions->getMaxPPExpandDepth() ) {
+               if ( is_object( $this->parser->mOptions ) && $expansionDepth > $this->parser->mOptions->getMaxPPExpandDepth() ) {
                        return '<span class="error">Expansion depth limit exceeded</span>';
                }
                wfProfileIn( __METHOD__ );