From: Tim Starling Date: Thu, 4 Sep 2008 06:37:51 +0000 (+0000) Subject: Ignore invalid titles in $out->getLanguageLinks(). X-Git-Tag: 1.31.0-rc.0~45493 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/modifier.php?a=commitdiff_plain;h=e9b95e43b8711959d8d6e6c4bfc5d1a139daf32b;p=lhc%2Fweb%2Fwiklou.git Ignore invalid titles in $out->getLanguageLinks(). --- diff --git a/includes/SkinTemplate.php b/includes/SkinTemplate.php index 9d766307e5..62d211d13b 100644 --- a/includes/SkinTemplate.php +++ b/includes/SkinTemplate.php @@ -413,11 +413,13 @@ class SkinTemplate extends Skin { $class = 'interwiki-' . $tmp[0]; unset($tmp); $nt = Title::newFromText( $l ); - $language_urls[] = array( - 'href' => $nt->getFullURL(), - 'text' => ($wgContLang->getLanguageName( $nt->getInterwiki()) != ''?$wgContLang->getLanguageName( $nt->getInterwiki()) : $l), - 'class' => $class - ); + if ( $nt ) { + $language_urls[] = array( + 'href' => $nt->getFullURL(), + 'text' => ($wgContLang->getLanguageName( $nt->getInterwiki()) != ''?$wgContLang->getLanguageName( $nt->getInterwiki()) : $l), + 'class' => $class + ); + } } } if(count($language_urls)) {