From 464c0875841dd2bbe3429aefa69ec1927304f6b8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Wed, 27 May 2009 19:07:27 +0000 Subject: [PATCH] * (bug 18943) Handle invalid titles gracefully at Special:Mostlinked --- RELEASE-NOTES | 1 + includes/specials/SpecialMostlinked.php | 3 +++ 2 files changed, 4 insertions(+) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index a3ac466235..95d7632d6f 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -162,6 +162,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN and user can upload * Don't say "You need to log in to upload/move", because it's possible that uploading/moving is disabled for registered users as well (e.g. only sysops) +* (bug 18943) Handle invalid titles gracefully at Special:Mostlinked == API changes in 1.16 == diff --git a/includes/specials/SpecialMostlinked.php b/includes/specials/SpecialMostlinked.php index e63e250191..cbe5e65dc6 100644 --- a/includes/specials/SpecialMostlinked.php +++ b/includes/specials/SpecialMostlinked.php @@ -75,6 +75,9 @@ class MostlinkedPage extends QueryPage { function formatResult( $skin, $result ) { global $wgLang; $title = Title::makeTitleSafe( $result->namespace, $result->title ); + if ( !$title ) { + return ''; + } $link = $skin->link( $title ); $wlh = $this->makeWlhLink( $title, wfMsgExt( 'nlinks', array( 'parsemag', 'escape'), -- 2.20.1