Skip to content

Commit

Permalink
Fix "Call to a member function getMaxPPNodeCount() on null" (lkucharc…
Browse files Browse the repository at this point in the history
  • Loading branch information
paladox committed Oct 3, 2021
1 parent eb05dd2 commit 4bd3503
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion includes/services/Helpers/PortableInfoboxParsingHelper.php
Expand Up @@ -29,7 +29,8 @@ public function parseIncludeonlyInfoboxes( $title ) {
if ( $templateText ) {
$parser = MediaWikiServices::getInstance()->getParser();
$parser->setTitle( $title );
$parserOptions = new \ParserOptions();
$parserOptions = \ParserOptions::newFromAnon();
$parser->setOptions( $parserOptions );
$frame = $parser->getPreprocessor()->newFrame();

$includeonlyText = $parser->getPreloadText( $templateText, $title, $parserOptions );
Expand Down

0 comments on commit 4bd3503

Please sign in to comment.