forked from Universal-Omega/DynamicPageList3
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
`ParserFactory::getParser` will create a completely new `Parser` instance. Based on the context, this instance may have not set a `Title` object. Thus accessing `Parser::getTitle` without checking for the return value may break the code. Issue: Universal-Omega#170
- Loading branch information
rvogel
committed
Apr 29, 2022
1 parent
376da33
commit 2236c92
Showing
2 changed files
with
13 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
No idea why
Parser::getTitle
is defined to never returnnull
. I have followed the path:MediaWikiServices::getParserFactory
ParserFactory::__construct
ParserFactory::create
Parser::__construct
Parser::setTitle
is nowhere called. Neither isParser::mTitle
initialised somewhere else in this callstack. Therefore there must be cases of whenParser::getTitle
returnsnull
.