From dcf9a4597431618d009c108ae7d5233c1aeab407 Mon Sep 17 00:00:00 2001 From: slawkens Date: Mon, 19 Jun 2023 08:01:35 +0200 Subject: [PATCH] Do not display warning if HTTP_ACCEPT_LANGUAGE is not set --- system/functions.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/system/functions.php b/system/functions.php index 49e31b2a..6c8d615e 100644 --- a/system/functions.php +++ b/system/functions.php @@ -757,10 +757,10 @@ function get_browser_languages() { $ret = array(); - $acceptLang = $_SERVER['HTTP_ACCEPT_LANGUAGE']; - if(!isset($acceptLang[0])) + if(empty($_SERVER['HTTP_ACCEPT_LANGUAGE'])) return $ret; + $acceptLang = $_SERVER['HTTP_ACCEPT_LANGUAGE']; $languages = strtolower($acceptLang); // $languages = 'pl,en-us;q=0.7,en;q=0.3 '; // need to remove spaces from strings to avoid error