From 7feaa1e37e7ba434ae8f0faf9dd915eb68bc2394 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sun, 8 Aug 2004 20:30:56 +0000 Subject: [PATCH] Gracefully fail on invalid title for target --- includes/SpecialContributions.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/includes/SpecialContributions.php b/includes/SpecialContributions.php index a88da3022d..19a527a503 100644 --- a/includes/SpecialContributions.php +++ b/includes/SpecialContributions.php @@ -26,6 +26,10 @@ function wfSpecialContributions( $par = "" ) $userCond = ""; $nt = Title::newFromURL( $target ); + if ( !$nt ) { + $wgOut->errorpage( "notargettitle", "notargettext" ); + return; + } $nt->setNamespace( Namespace::getUser() ); $id = User::idFromName( $nt->getText() ); -- 2.20.1