diff options
Diffstat (limited to '')
-rw-r--r-- | include/functions_user.inc.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/functions_user.inc.php b/include/functions_user.inc.php index 6276d37a0..b25105c6e 100644 --- a/include/functions_user.inc.php +++ b/include/functions_user.inc.php @@ -851,7 +851,14 @@ function get_default_language() */ function get_browser_language(&$lang) { - $browser_language = substr($_SERVER["HTTP_ACCEPT_LANGUAGE"], 0, 2); + if (!empty($_SERVER["HTTP_ACCEPT_LANGUAGE"])) + { + $browser_language = substr($_SERVER["HTTP_ACCEPT_LANGUAGE"], 0, 2); + } + else + { + $browser_language = ''; + } foreach (get_languages() as $language_code => $language_name) { if (substr($language_code, 0, 2) == $browser_language) |