1
0
Fork 0
mirror of https://github.com/RSS-Bridge/rss-bridge.git synced 2025-04-02 23:05:47 +03:00

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

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) { foreach ($originalLocales as $localeSetting) {
if (strpos($localeSetting, '=') !== false) { if (strpos($localeSetting, '=') !== false) {
[$category, $locale] = explode('=', $localeSetting); [$category, $locale] = explode('=', $localeSetting);
if (! defined($category)) {
continue;
}
$category = constant($category);
} else { } else {
$category = LC_ALL; $category = LC_ALL;
$locale = $localeSetting; $locale = $localeSetting;