Skip to content

Commit

Permalink
Merge pull request #776 from WikiTeq/IEEE23-28/fix-for-ve
Browse files Browse the repository at this point in the history
Do not call $parser->clearState() when parser options exist
  • Loading branch information
JeroenDeDauw authored Mar 20, 2024
2 parents 6689edd + 888b76f commit 7175b47
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/SemanticMW/QueryHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -468,12 +468,12 @@ private function getTitleOutput( string $titleText ) {
}

private function getParser(): \Parser {
$user = \RequestContext::getMain()->getUser();
$parser = MediaWikiServices::getInstance()->getParser();
if ( !$parser->getOptions() ) {
$user = \RequestContext::getMain()->getUser();
$parser->setOptions( new \ParserOptions( $user ) );
$parser->clearState();
}
$parser->clearState();
return $parser;
}

Expand Down

0 comments on commit 7175b47

Please sign in to comment.