Skip to content

Commit

Permalink
Merge pull request #388 from findologic/PH-1083-empty-search-request
Browse files Browse the repository at this point in the history
empty search request is being sent
  • Loading branch information
simonhintersonnleitner authored Sep 4, 2024
2 parents 8acb931 + c165175 commit f54a892
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Api/Response/Response.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function getVariationIds()
foreach ($products as $product) {
if (isset($product['bestVariant'])) {
$ids[] = (int) $product['bestVariant'];
} else if (count($product['variants'])) {
} else if ($product['variants'] && count($product['variants'])) {
$ids[] = (int) $product['variants'][0]['id'];
} else if (isset($product['properties'][Plugin::API_PROPERTY_VARIATION_ID])) {
$ids[] = (int) $product['properties'][Plugin::API_PROPERTY_VARIATION_ID];
Expand Down

0 comments on commit f54a892

Please sign in to comment.