From 8e66f32ddcb902f8dbb8559db655df88424a38b6 Mon Sep 17 00:00:00 2001 From: Sebastian Almberg <83243306+Sebbeben@users.noreply.github.com> Date: Thu, 12 Mar 2026 10:40:28 +0100 Subject: [PATCH] Fix TypeError in LCSCProvider when keyword is numeric string PHP auto-casts numeric string array keys to int. When a search keyword is a pure number (e.g., a part number like "12345"), the foreach loop passes an int to processSearchResponse() which expects string. Cast keyword to string explicitly. --- src/Services/InfoProviderSystem/Providers/LCSCProvider.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Services/InfoProviderSystem/Providers/LCSCProvider.php b/src/Services/InfoProviderSystem/Providers/LCSCProvider.php index 1b807eff..3aeec69d 100755 --- a/src/Services/InfoProviderSystem/Providers/LCSCProvider.php +++ b/src/Services/InfoProviderSystem/Providers/LCSCProvider.php @@ -396,6 +396,7 @@ class LCSCProvider implements BatchInfoProviderInterface, URLHandlerInfoProvider // Now collect all results (like .then() in JavaScript) foreach ($responses as $keyword => $response) { try { + $keyword = (string) $keyword; $arr = $response->toArray(); // This waits for the response $results[$keyword] = $this->processSearchResponse($arr, $keyword); } catch (\Exception $e) {