Merge pull request #504 from ArthurHoaro/hotfix/http_language
Fixes #503: check that HTTP_ACCEPT_LANGUAGE is set before calling autolocale
This commit is contained in:
commit
9f277ad878
1 changed files with 4 additions and 1 deletions
|
@ -268,7 +268,10 @@ function stripslashes_deep($value) { $value = is_array($value) ? array_map('stri
|
||||||
// a token depending of deployment salt, user password, and the current ip
|
// a token depending of deployment salt, user password, and the current ip
|
||||||
define('STAY_SIGNED_IN_TOKEN', sha1($GLOBALS['hash'].$_SERVER["REMOTE_ADDR"].$GLOBALS['salt']));
|
define('STAY_SIGNED_IN_TOKEN', sha1($GLOBALS['hash'].$_SERVER["REMOTE_ADDR"].$GLOBALS['salt']));
|
||||||
|
|
||||||
autoLocale($_SERVER['HTTP_ACCEPT_LANGUAGE']); // Sniff browser language and set date format accordingly.
|
// Sniff browser language and set date format accordingly.
|
||||||
|
if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
|
||||||
|
autoLocale($_SERVER['HTTP_ACCEPT_LANGUAGE']);
|
||||||
|
}
|
||||||
header('Content-Type: text/html; charset=utf-8'); // We use UTF-8 for proper international characters handling.
|
header('Content-Type: text/html; charset=utf-8'); // We use UTF-8 for proper international characters handling.
|
||||||
|
|
||||||
//==================================================================================================
|
//==================================================================================================
|
||||||
|
|
Loading…
Reference in a new issue