From b8eeda60233bccc64f1672613a21043fc8c835ca Mon Sep 17 00:00:00 2001 From: Daniel Winzen Date: Fri, 4 Apr 2025 11:12:57 +0300 Subject: [PATCH] Some hosting providers may disable putenv for security reasons, check before using --- chat.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/chat.php b/chat.php index a06c5b1..1c9b72d 100644 --- a/chat.php +++ b/chat.php @@ -4897,7 +4897,9 @@ function load_lang(): void } } } - putenv('LC_ALL='.$locale); + if(function_exists('putenv')) { + putenv('LC_ALL='.$locale); + } setlocale(LC_ALL, $locale); bindtextdomain('le-chat-php', __DIR__.'/locale'); bind_textdomain_codeset('le-chat-php', 'UTF-8');