diff options
author | Mario <mario@mariovavti.com> | 2023-02-27 08:22:35 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2023-02-27 08:22:35 +0000 |
commit | 9ab9ac0e2eab443265ceeba2f6dfbaa41c853a65 (patch) | |
tree | 685f58d9b330da4cf9aea14c73707ae2bbd9dd65 /include/language.php | |
parent | fd3adf4d11c3c9f2ff92389b315da90f2a47c1b7 (diff) | |
download | volse-hubzilla-9ab9ac0e2eab443265ceeba2f6dfbaa41c853a65.tar.gz volse-hubzilla-9ab9ac0e2eab443265ceeba2f6dfbaa41c853a65.tar.bz2 volse-hubzilla-9ab9ac0e2eab443265ceeba2f6dfbaa41c853a65.zip |
possible fix for issue #1731
Diffstat (limited to 'include/language.php')
-rw-r--r-- | include/language.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/language.php b/include/language.php index 23aff0a02..e7363cffb 100644 --- a/include/language.php +++ b/include/language.php @@ -24,15 +24,15 @@ use CommerceGuys\Intl\Language\LanguageRepository; * @return array with ordered list of preferred languages from browser */ function get_browser_language() { - $langs = array(); - $lang_parse = array(); + $langs = []; + $lang_parse = []; if (x($_SERVER, 'HTTP_ACCEPT_LANGUAGE')) { // break up string into pieces (languages and q factors) preg_match_all('/([a-z]{1,8}(-[a-z]{1,8})?)\s*(;\s*q\s*=\s*(1|0\.[0-9]+))?/i', $_SERVER['HTTP_ACCEPT_LANGUAGE'], $lang_parse); - if (count($lang_parse[1])) { + if (is_array($lang_parse[1])) { // create a list like "en" => 0.8 $langs = array_combine($lang_parse[1], $lang_parse[4]); |