Skip to content

Commit

Permalink
Fix utf8 C locale detection wihout intl
Browse files Browse the repository at this point in the history
  • Loading branch information
rlanvin committed Jun 23, 2024
1 parent 747bc47 commit 4b19d8e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/RRule.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
}
}
Expand Down

0 comments on commit 4b19d8e

Please sign in to comment.