Index: trunk/phase3/includes/parser/Preprocessor_DOM.php |
— | — | @@ -956,12 +956,11 @@ |
957 | 957 | return $root; |
958 | 958 | } |
959 | 959 | |
960 | | - if ( is_object( $this->parser->mOptions ) && ++$this->parser->mPPNodeCount > $this->parser->mOptions->getMaxPPNodeCount() ) |
961 | | - { |
| 960 | + if ( ++$this->parser->mPPNodeCount > $this->parser->mOptions->getMaxPPNodeCount() ) { |
962 | 961 | return '<span class="error">Node-count limit exceeded</span>'; |
963 | 962 | } |
964 | 963 | |
965 | | - if ( is_object( $this->parser->mOptions ) && $expansionDepth > $this->parser->mOptions->getMaxPPExpandDepth() ) { |
| 964 | + if ( $expansionDepth > $this->parser->mOptions->getMaxPPExpandDepth() ) { |
966 | 965 | return '<span class="error">Expansion depth limit exceeded</span>'; |
967 | 966 | } |
968 | 967 | wfProfileIn( __METHOD__ ); |
Index: branches/wmf/1.17wmf1/includes/parser/Preprocessor_DOM.php |
— | — | @@ -902,12 +902,12 @@ |
903 | 903 | return $root; |
904 | 904 | } |
905 | 905 | |
906 | | - if ( is_object( $this->parser->mOptions ) && ++$this->parser->mPPNodeCount > $this->parser->mOptions->getMaxPPNodeCount() ) |
| 906 | + if ( ++$this->parser->mPPNodeCount > $this->parser->mOptions->getMaxPPNodeCount() ) |
907 | 907 | { |
908 | 908 | return '<span class="error">Node-count limit exceeded</span>'; |
909 | 909 | } |
910 | 910 | |
911 | | - if ( is_object( $this->parser->mOptions ) && $expansionDepth > $this->parser->mOptions->getMaxPPExpandDepth() ) { |
| 911 | + if ( $expansionDepth > $this->parser->mOptions->getMaxPPExpandDepth() ) { |
912 | 912 | return '<span class="error">Expansion depth limit exceeded</span>'; |
913 | 913 | } |
914 | 914 | wfProfileIn( __METHOD__ ); |