Fixed exception in LCSCProvider

This commit is contained in:
Jan Böhmer 2026-07-20 00:02:13 +02:00
parent 16bb09c153
commit 07d106e44d

View file

@ -151,7 +151,7 @@ class LCSCProvider implements BatchInfoProviderInterface, URLHandlerInfoProvider
//If we get exact matches, use them
if (!empty($arr['result']['exactMatchResult'])) {
$products = $arr['result']['a'];
$products = $arr['result']['exactMatchResult'];
} else { //Otherwise fallback onto the third search endpoint, which has a worse data quality but is more likely to return results for vague search terms
$response = $this->lcscClient->request('POST', self::ENDPOINT_URL."/search/third", [
'headers' => [
@ -170,6 +170,8 @@ class LCSCProvider implements BatchInfoProviderInterface, URLHandlerInfoProvider
$products = $arr['result']['productList'] ?? [];
}
$result = [];
foreach ($products as $product) {
$result[] = $this->getPartDetail($product, $lightweight);
}