Index: trunk/phase3/maintenance/parserTests.inc |
— | — | @@ -298,7 +298,7 @@ |
299 | 299 | if ( $this->showProgress ) { |
300 | 300 | print "\n"; |
301 | 301 | } |
302 | | - return $ok; |
| 302 | + return $ok; |
303 | 303 | } |
304 | 304 | |
305 | 305 | /** |
— | — | @@ -352,7 +352,7 @@ |
353 | 353 | |
354 | 354 | $noxml = isset( $opts['noxml'] ); |
355 | 355 | $local = isset( $opts['local'] ); |
356 | | - $preprocessor = @$opts['preprocessor']; |
| 356 | + $preprocessor = isset( $opts['preprocessor'] ) ? $opts['preprocessor'] : null; |
357 | 357 | $parser = $this->getParser( $preprocessor ); |
358 | 358 | $title = Title::newFromText( $titleText ); |
359 | 359 | |
— | — | @@ -1638,8 +1638,10 @@ |
1639 | 1639 | if( !isset( $data['article'] ) ) { |
1640 | 1640 | wfDie( "'endarticle' without 'article' at line {$this->lineNum} of $filename\n" ); |
1641 | 1641 | } |
1642 | | - if( $this->parser ) $this->parser->addArticle($this->parser->chomp($data['article']), $this->parser->chomp($data['text']), |
1643 | | - $this->lineNum); |
| 1642 | + if( $this->parser ) { |
| 1643 | + $this->parser->addArticle($this->parser->chomp($data['article']), $this->parser->chomp($data['text']), |
| 1644 | + $this->lineNum); |
| 1645 | + } |
1644 | 1646 | $data = array(); |
1645 | 1647 | $section = null; |
1646 | 1648 | continue; |
— | — | @@ -1688,8 +1690,9 @@ |
1689 | 1691 | if (!isset( $data['config'] ) ) |
1690 | 1692 | $data['config'] = ''; |
1691 | 1693 | |
1692 | | - if ( $this->parser && (preg_match('/\\bdisabled\\b/i', $data['options']) && !$this->parser->runDisabled) |
1693 | | - || !preg_match("/{$this->parser->regex}/i", $data['test']) ) { |
| 1694 | + if ( $this->parser |
| 1695 | + && ((preg_match('/\\bdisabled\\b/i', $data['options']) && !$this->parser->runDisabled) |
| 1696 | + || !preg_match("/".$this->parser->regex."/i", $data['test'])) ) { |
1694 | 1697 | # disabled test |
1695 | 1698 | $data = array(); |
1696 | 1699 | $section = null; |