Skip to content

Commit

Permalink
Fix when no pids have been given but store has been set
Browse files Browse the repository at this point in the history
Closes #69
  • Loading branch information
peterjaap authored Mar 19, 2022
1 parent 432c6e7 commit 2ba397d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Service/RegenerateProductUrl.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function execute(?array $productIds = null, ?int $storeId = null, bool $v
->addFieldToFilter('status', ['eq' => Status::STATUS_ENABLED])
->addFieldToFilter('visibility', ['gt' => Visibility::VISIBILITY_NOT_VISIBLE]);

if (is_null($productIds)) {
if (is_null($productIds) || (is_array($productIds) && empty($productIds))) {
$productIds = $collection->getAllIds();
}
$collection->addIdFilter($productIds);
Expand Down

0 comments on commit 2ba397d

Please sign in to comment.