From: Niklas Laxström Date: Tue, 3 Jun 2008 20:32:13 +0000 (+0000) Subject: * When passing invalid or nonexistent language code to wfMsgExt, fallback to English... X-Git-Tag: 1.31.0-rc.0~47200 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=e9ccdd29ca36092ca962e6d502c74a83cb1a4972;p=lhc%2Fweb%2Fwiklou.git * When passing invalid or nonexistent language code to wfMsgExt, fallback to English instead of some random interface language we are currently using --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 6bd1fb8bb3..69458a436f 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -587,7 +587,8 @@ function wfMsgExt( $key, $options ) { $langCode = $options['language']; $validCodes = array_keys( Language::getLanguageNames() ); if( !in_array($options['language'], $validCodes) ) { - $langCode = false; + # Fallback to en, instead of whatever interface language we might have + $langCode = 'en'; } } else { $forContent = false;