From 7be4d7172a48b9d2268b56f3c1450828923c8958 Mon Sep 17 00:00:00 2001 From: tokul Date: Mon, 9 May 2005 17:25:56 +0000 Subject: [PATCH] provide failsafe language in case $sm_language is not set in accept_lang and default language. git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@9410 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- functions/i18n.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/functions/i18n.php b/functions/i18n.php index e243ce56..554ab442 100644 --- a/functions/i18n.php +++ b/functions/i18n.php @@ -322,6 +322,10 @@ function set_up_language($sm_language, $do_search = false, $default = false) { $squirrelmail_language = $squirrelmail_default_language; $sm_language = $squirrelmail_default_language; } + + /** provide failsafe language when detection fails */ + if (! $sm_language) $sm_language='en_US'; + $sm_notAlias = $sm_language; // Catching removed translation -- 2.25.1