mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CategoryTree
synced 2024-11-27 17:51:00 +00:00
Merge "Check for null after Title::newFromText"
This commit is contained in:
commit
ba6e585427
|
@ -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() );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue