From b7c412d4d0fec7f3f54ecaa09178afa16c779d7e Mon Sep 17 00:00:00 2001 From: ArthurHoaro Date: Wed, 31 Jan 2018 12:39:17 +0100 Subject: Use LC_COLLATE instead of LC_MESSAGES if php-intl is not installed As stated in the docs: > LC_MESSAGES for system responses (available if PHP was compiled with libintl) Fixes #1067 --- index.php | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'index.php') diff --git a/index.php b/index.php index d57789e6..2de9be0a 100644 --- a/index.php +++ b/index.php @@ -124,6 +124,11 @@ if (isset($_COOKIE['shaarli']) && !SessionManager::checkId($_COOKIE['shaarli'])) $conf = new ConfigManager(); $sessionManager = new SessionManager($_SESSION, $conf); +// LC_MESSAGES isn't defined without php-intl, in this case use LC_COLLATE locale instead. +if (! defined('LC_MESSAGES')) { + define('LC_MESSAGES', LC_COLLATE); +} + // Sniff browser language and set date format accordingly. if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { autoLocale($_SERVER['HTTP_ACCEPT_LANGUAGE']); -- cgit v1.2.3