preprocessDump.php: Fix invalid Preprocessor instantiation
authorUmherirrender <umherirrender_de.wp@web.de>
Fri, 5 Jul 2019 20:16:26 +0000 (22:16 +0200)
committerKrinkle <krinklemail@gmail.com>
Sun, 8 Sep 2019 03:56:30 +0000 (03:56 +0000)
The Preprocessor constructor needs a Parser object,
not the maintenance object itself.

Change-Id: I0f60b968b52d29c0e7484409cc4aa790ca391303

maintenance/preprocessDump.php

index b9e084e..f0e5a6c 100644 (file)
@@ -73,8 +73,9 @@ class PreprocessDump extends DumpIterator {
                        $name = Preprocessor_DOM::class;
                }
 
-               MediaWikiServices::getInstance()->getParser()->firstCallInit();
-               $this->mPreprocessor = new $name( $this );
+               $parser = MediaWikiServices::getInstance()->getParser();
+               $parser->firstCallInit();
+               $this->mPreprocessor = new $name( $parser );
        }
 
        /**