Page MenuHomePhabricator

Parser::getFreshParser should always return a fresh parser
Open, Needs TriagePublic


Parser::getFreshParser sometimes returns $this. This is a relic of previous code which had a global $wgParser which it kept alive forever and tried to reuse. We should let the $parser go out of scope and get gc'ed and just create a new one if/when needed, instead of playing games and trying to reuse parser state.