From 4b19d8ef607ba97288ab7b7d908e049079df97d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Lanvin?= <1701590+rlanvin@users.noreply.github.com> Date: Sun, 23 Jun 2024 09:01:48 +0200 Subject: [PATCH] Fix utf8 C locale detection wihout intl --- src/RRule.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/RRule.php b/src/RRule.php index c77c052..8380c41 100755 --- a/src/RRule.php +++ b/src/RRule.php @@ -2102,7 +2102,7 @@ public function humanReadable(array $opt = array()) $default_opt['locale'] = \Locale::getDefault(); } else { $default_opt['locale'] = setlocale(LC_CTYPE, 0); - if ($default_opt['locale'] == 'C') { + if (!$default_opt['locale'] || $default_opt['locale'][0] == 'C') { $default_opt['locale'] = 'en'; } }