From: Aryeh Gregor Date: Fri, 5 Sep 2008 15:35:16 +0000 (+0000) Subject: Don't fail fatally when Linker::link() is passed a non-object X-Git-Tag: 1.31.0-rc.0~45466 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=a444b22c24495acd4c1d1206dfb9aa6a779a0482;p=lhc%2Fweb%2Fwiklou.git 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. --- 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;