From: Catrope Date: Wed, 22 Aug 2012 19:21:59 +0000 (-0700) Subject: Fix tocList() breakage in 6fe1f050 X-Git-Tag: 1.31.0-rc.0~22633^2 X-Git-Url: http://git.cyclocoop.org//%27%40script%40/%27?a=commitdiff_plain;h=f80b212aa2fc1ae9067269d9058f35abf21f6d45;p=lhc%2Fweb%2Fwiklou.git Fix tocList() breakage in 6fe1f050 The $lang parameter defaults to false, but Message::inLanguage() doesn't like false, so do an explicit check for false. Change-Id: I66fb2d11269a988ae92b1594314807a4eed54f1b --- diff --git a/includes/Linker.php b/includes/Linker.php index 632cf432f0..32a99cb15b 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -1594,7 +1594,11 @@ class Linker { * @return String: full html of the TOC */ public static function tocList( $toc, $lang = false ) { - $title = wfMessage( 'toc' )->inLanguage( $lang )->escaped(); + $msg = wfMessage( 'toc' ); + if ( $lang !== false ) { + $msg = $msg->inLanguage( $lang ); + } + $title = $msg->escaped(); return '
' . '

' . $title . "

\n"