Fix failing preprocessor tests by checking if ot is set.
authorMark A. Hershberger <mah@users.mediawiki.org>
Fri, 27 May 2011 21:43:07 +0000 (21:43 +0000)
committerMark A. Hershberger <mah@users.mediawiki.org>
Fri, 27 May 2011 21:43:07 +0000 (21:43 +0000)
includes/parser/Preprocessor_DOM.php

index b08ed09..9305496 100644 (file)
@@ -185,7 +185,7 @@ class Preprocessor_DOM implements Preprocessor {
                        if ( strpos( $text, '<onlyinclude>' ) !== false && strpos( $text, '</onlyinclude>' ) !== false ) {
                                $enableOnlyinclude = true;
                        }
-               } else if ( $this->parser->ot['wiki'] ) {
+               } else if ( isset( $this->parser->ot ) && $this->parser->ot['wiki'] ) {
                        $ignoredTags = array( 'noinclude', '/noinclude', 'onlyinclude', '/onlyinclude', 'includeonly', '/includeonly' );
                        $ignoredElements = array();
                } else {