fix: TypeError (0): setlocale(): Argument #1 ($category) must be of type int, string given (#2951)

This was upgraded from a warning to an error in php 8.
This commit is contained in:
Dag 2022-08-06 22:46:49 +02:00 committed by GitHub
parent 2bbce8ebef
commit eef45d4e8d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -121,6 +121,10 @@ class IvooxBridge extends BridgeAbstract
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;