Merge "Check for null after Title::newFromText"

This commit is contained in:
jenkins-bot 2022-11-12 17:31:19 +00:00 committed by Gerrit Code Review
commit ba6e585427

View file

@ -467,9 +467,7 @@ class CategoryTree {
foreach ( $res as $row ) {
$title = Title::newFromText( $row->page_title, $row->page_namespace );
// Page name could have slashes, check the subpage for valid language built-in codes
$isValidLangCode = $title->getSubpageText();
if ( $title !== null && $isValidLangCode ) {
if ( $title !== null && $title->getSubpageText() ) {
$lb->addObj( $title->getBaseTitle() );
}
}