From eef45d4e8d5b69b76b5f3924d17a957748cf498e Mon Sep 17 00:00:00 2001 From: Dag Date: Sat, 6 Aug 2022 22:46:49 +0200 Subject: [PATCH] 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. --- bridges/IvooxBridge.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bridges/IvooxBridge.php b/bridges/IvooxBridge.php index 4306cbf7..0034175d 100644 --- a/bridges/IvooxBridge.php +++ b/bridges/IvooxBridge.php @@ -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;