mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/ParserFunctions
synced 2024-11-15 11:59:54 +00:00
Watch out for invalid titles
This commit is contained in:
parent
ba67528419
commit
b225dd82ad
|
@ -418,9 +418,11 @@ class ExtParserFunctions {
|
|||
$warning = wfMsg( 'pfunc_ifexist_warning', $parser->pf_ifexist_count, $wgMaxIfexistCount );
|
||||
$parser->mOutput->addWarning( $warning );
|
||||
$cat = Title::makeTitleSafe( NS_CATEGORY, wfMsg( 'pfunc_max_ifexist_category' ) );
|
||||
if ( $cat ) {
|
||||
$parser->mOutput->addCategory( $cat->getDBkey(), $parser->getDefaultSort() );
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue