Watch out for invalid titles

This commit is contained in:
Tim Starling 2007-12-10 06:11:52 +00:00
parent ba67528419
commit b225dd82ad

View file

@ -418,7 +418,9 @@ 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' ) );
$parser->mOutput->addCategory( $cat->getDBkey(), $parser->getDefaultSort() );
if ( $cat ) {
$parser->mOutput->addCategory( $cat->getDBkey(), $parser->getDefaultSort() );
}
}
}
return true;