Skip to content

Commit

Permalink
fix: TypeError (0): setlocale(): Argument #1 ($category) must be of t…
Browse files Browse the repository at this point in the history
…ype int, string given

This was upgraded from a warning to an error in php 8.
  • Loading branch information
dvikan committed Aug 3, 2022
1 parent ecb4867 commit c77629f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bridges/IvooxBridge.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ public function collectData()
foreach ($originalLocales as $localeSetting) {
if (strpos($localeSetting, '=') !== false) {
[$category, $locale] = explode('=', $localeSetting);
if (! defined($category)) {
continue;
}
$category = constant($category);
} else {
$category = LC_ALL;
$locale = $localeSetting;
Expand Down

0 comments on commit c77629f

Please sign in to comment.