aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2016-02-28 15:53:28 +0100
committerArthurHoaro <arthur@hoa.ro>2016-02-28 15:53:28 +0100
commit408def1a07acc3d07ffaa3e19e48b4d0929a7172 (patch)
tree9cfe521d577561a6b2c29333a4f9e12dd3d5bc0d /index.php
parent8710d4da8e21b31a90bdcaed10521e0b937cf6c2 (diff)
downloadShaarli-408def1a07acc3d07ffaa3e19e48b4d0929a7172.tar.gz
Shaarli-408def1a07acc3d07ffaa3e19e48b4d0929a7172.tar.zst
Shaarli-408def1a07acc3d07ffaa3e19e48b4d0929a7172.zip
Fixes #503: check that HTTP_ACCEPT_LANGUAGE is set before calling autoLocale()
Diffstat (limited to 'index.php')
-rw-r--r--index.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/index.php b/index.php
index d1acb8af..c65a780c 100644
--- a/index.php
+++ b/index.php
@@ -268,7 +268,10 @@ $GLOBALS['redirector'] = !empty($GLOBALS['redirector']) ? escape($GLOBALS['redir
268// a token depending of deployment salt, user password, and the current ip 268// a token depending of deployment salt, user password, and the current ip
269define('STAY_SIGNED_IN_TOKEN', sha1($GLOBALS['hash'].$_SERVER["REMOTE_ADDR"].$GLOBALS['salt'])); 269define('STAY_SIGNED_IN_TOKEN', sha1($GLOBALS['hash'].$_SERVER["REMOTE_ADDR"].$GLOBALS['salt']));
270 270
271autoLocale($_SERVER['HTTP_ACCEPT_LANGUAGE']); // Sniff browser language and set date format accordingly. 271// Sniff browser language and set date format accordingly.
272if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) {
273 autoLocale($_SERVER['HTTP_ACCEPT_LANGUAGE']);
274}
272header('Content-Type: text/html; charset=utf-8'); // We use UTF-8 for proper international characters handling. 275header('Content-Type: text/html; charset=utf-8'); // We use UTF-8 for proper international characters handling.
273 276
274//================================================================================================== 277//==================================================================================================