From a444b22c24495acd4c1d1206dfb9aa6a779a0482 Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Fri, 5 Sep 2008 15:35:16 +0000 Subject: [PATCH] Don't fail fatally when Linker::link() is passed a non-object This matches old behavior of makeKnownLinkObj() et al., effectively reverting part of r38162. We'd usually like to render the rest of the page even if one link fails. We might want to raise an E_USER_WARNING here, though. --- includes/Linker.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Linker.php b/includes/Linker.php index cc02241410..aa21f90e5c 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -178,7 +178,7 @@ class Linker { } if( !$target instanceof Title ) { - throw new MWException( 'Linker::link passed invalid target' ); + return "$text"; } $options = (array)$options; -- 2.20.1