From: Tim Starling Date: Sat, 17 Jun 2006 08:55:44 +0000 (+0000) Subject: Avoid fatal error on invalid title X-Git-Tag: 1.31.0-rc.0~56758 X-Git-Url: http://git.cyclocoop.org/%22.%28%24lien.?a=commitdiff_plain;h=859a3e942edcc75d770ee9df2d63150b6b00d7c1;p=lhc%2Fweb%2Fwiklou.git Avoid fatal error on invalid title --- diff --git a/includes/Parser.php b/includes/Parser.php index ada2708e26..caae1d2ea4 100644 --- a/includes/Parser.php +++ b/includes/Parser.php @@ -2898,13 +2898,14 @@ class Parser } $title = Title::newFromText( $part1, $ns ); - $checkVariantLink = sizeof($wgContLang->getVariants())>1; - # Check for language variants if the template is not found - if($checkVariantLink && $title->getArticleID() == 0){ - $wgContLang->findVariantLink($part1, $title); - } if ( !is_null( $title ) ) { + $checkVariantLink = sizeof($wgContLang->getVariants())>1; + # Check for language variants if the template is not found + if($checkVariantLink && $title->getArticleID() == 0){ + $wgContLang->findVariantLink($part1, $title); + } + if ( !$title->isExternal() ) { # Check for excessive inclusion $dbk = $title->getPrefixedDBkey();