From 859a3e942edcc75d770ee9df2d63150b6b00d7c1 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sat, 17 Jun 2006 08:55:44 +0000 Subject: [PATCH] Avoid fatal error on invalid title --- includes/Parser.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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(); -- 2.20.1