Tweak for r79018: fatal errors due to something calling parser clearState when mOptio...
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 8 Feb 2011 13:31:30 +0000 (13:31 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 8 Feb 2011 13:31:30 +0000 (13:31 +0000)
includes/parser/Parser.php

index b7c63bf..9d9ccad 100644 (file)
@@ -194,7 +194,9 @@ class Parser {
                        $this->firstCallInit();
                }
                $this->mOutput = new ParserOutput;
-               $this->mOptions->registerWatcher( array( $this->mOutput, 'recordOption' ) );
+               if( $this->mOptions ) {
+                       $this->mOptions->registerWatcher( array( $this->mOutput, 'recordOption' ) );
+               }
                $this->mAutonumber = 0;
                $this->mLastSection = '';
                $this->mDTopen = false;