mirror of
https://github.com/slawkens/myaac.git
synced 2025-04-27 01:39:22 +02:00
Fix warning when no header language set
This commit is contained in:
parent
de710dff94
commit
61c2661377
@ -754,10 +754,10 @@ function get_browser_languages()
|
|||||||
{
|
{
|
||||||
$ret = array();
|
$ret = array();
|
||||||
|
|
||||||
$acceptLang = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
|
if(empty($_SERVER['HTTP_ACCEPT_LANGUAGE']))
|
||||||
if(!isset($acceptLang[0]))
|
|
||||||
return $ret;
|
return $ret;
|
||||||
|
|
||||||
|
$acceptLang = $_SERVER['HTTP_ACCEPT_LANGUAGE'];
|
||||||
$languages = strtolower($acceptLang);
|
$languages = strtolower($acceptLang);
|
||||||
// $languages = 'pl,en-us;q=0.7,en;q=0.3 ';
|
// $languages = 'pl,en-us;q=0.7,en;q=0.3 ';
|
||||||
// need to remove spaces from strings to avoid error
|
// need to remove spaces from strings to avoid error
|
||||||
|
Loading…
x
Reference in New Issue
Block a user