From e9ccdd29ca36092ca962e6d502c74a83cb1a4972 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niklas=20Laxstr=C3=B6m?= Date: Tue, 3 Jun 2008 20:32:13 +0000 Subject: [PATCH] * When passing invalid or nonexistent language code to wfMsgExt, fallback to English instead of some random interface language we are currently using --- includes/GlobalFunctions.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.20.1