Gracefully fail on invalid title for target
authorBrion Vibber <brion@users.mediawiki.org>
Sun, 8 Aug 2004 20:30:56 +0000 (20:30 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sun, 8 Aug 2004 20:30:56 +0000 (20:30 +0000)
includes/SpecialContributions.php

index a88da30..19a527a 100644 (file)
@@ -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() );