From 65ddd4bd1d7f2accc6c60532930ea557fe3de374 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Wed, 1 Oct 2003 22:57:50 +0000 Subject: [PATCH] skip illegal links --- includes/SpecialWhatlinkshere.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/includes/SpecialWhatlinkshere.php b/includes/SpecialWhatlinkshere.php index 23922fd206..8d1c4ba556 100644 --- a/includes/SpecialWhatlinkshere.php +++ b/includes/SpecialWhatlinkshere.php @@ -15,6 +15,10 @@ function wfSpecialWhatlinkshere($par = NULL) return; } $nt = Title::newFromURL( $target ); + if( !$nt ) { + $wgOut->errorpage( "notargettitle", "notargettext" ); + return; + } $wgOut->setPagetitle( $nt->getPrefixedText() ); $wgOut->setSubtitle( wfMsg( "linklistsub" ) ); @@ -81,6 +85,9 @@ function wfShowIndirectLinks( $level, $lid ) $wgOut->addHTML( "\n" ); } -- 2.20.1