$msg = $this->msg( 'pagecategories' )->numParams( count( $allCats['normal'] ) )->escaped();
$linkPage = wfMessage( 'pagecategorieslink' )->inContentLanguage()->text();
+ $title = Title::newFromText( $linkPage );
+ $link = $title ? Linker::link( $title, $msg ) : $msg;
$s .= '<div id="mw-normal-catlinks" class="mw-normal-catlinks">' .
- Linker::link( Title::newFromText( $linkPage ), $msg )
- . $colon . '<ul>' . $t . '</ul>' . '</div>';
+ $link . $colon . '<ul>' . $t . '</ul>' . '</div>';
}
# Hidden categories
// but we make the link target be the one site-wide page.
$title = Title::newFromText( $this->msg( $page )->inContentLanguage()->text() );
+ if ( !$title ) {
+ return '';
+ }
+
return Linker::linkKnown(
$title,
$this->msg( $desc )->escaped()