diff options
author | ArthurHoaro <arthur@hoa.ro> | 2018-02-02 18:51:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-02 18:51:53 +0100 |
commit | 40e816e3796d7d4fdf4b442c25f4c2b76f5eebc0 (patch) | |
tree | 92b1cae91b21e8d3edf41df8dd561cdfd39be42c /index.php | |
parent | 499bd43c37a6ee3d13dabe8bdd0bb449ae57122a (diff) | |
parent | b7c412d4d0fec7f3f54ecaa09178afa16c779d7e (diff) | |
download | Shaarli-40e816e3796d7d4fdf4b442c25f4c2b76f5eebc0.tar.gz Shaarli-40e816e3796d7d4fdf4b442c25f4c2b76f5eebc0.tar.zst Shaarli-40e816e3796d7d4fdf4b442c25f4c2b76f5eebc0.zip |
Merge pull request #1070 from ArthurHoaro/hotfix/lc-messages-warning
Use LC_COLLATE instead of LC_MESSAGES if php-intl is not installed
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -124,6 +124,11 @@ if (isset($_COOKIE['shaarli']) && !SessionManager::checkId($_COOKIE['shaarli'])) | |||
124 | $conf = new ConfigManager(); | 124 | $conf = new ConfigManager(); |
125 | $sessionManager = new SessionManager($_SESSION, $conf); | 125 | $sessionManager = new SessionManager($_SESSION, $conf); |
126 | 126 | ||
127 | // LC_MESSAGES isn't defined without php-intl, in this case use LC_COLLATE locale instead. | ||
128 | if (! defined('LC_MESSAGES')) { | ||
129 | define('LC_MESSAGES', LC_COLLATE); | ||
130 | } | ||
131 | |||
127 | // Sniff browser language and set date format accordingly. | 132 | // Sniff browser language and set date format accordingly. |
128 | if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { | 133 | if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { |
129 | autoLocale($_SERVER['HTTP_ACCEPT_LANGUAGE']); | 134 | autoLocale($_SERVER['HTTP_ACCEPT_LANGUAGE']); |