1
0
mirror of https://github.com/rlanvin/php-rrule.git synced 2024-11-28 05:24:10 +01:00

Fix utf8 C locale detection wihout intl

This commit is contained in:
Rémi Lanvin 2024-06-23 09:01:48 +02:00
parent 747bc473d9
commit 4b19d8ef60

View File

@ -2102,7 +2102,7 @@ class RRule implements RRuleInterface
$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';
}
}