Skip to content

Commit 9e1b438

Browse files
committed
Improve code quality
1 parent e17a4b6 commit 9e1b438

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

app/code/Magento/Catalog/Model/Indexer/Category/Product/AbstractAction.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
use Magento\Framework\EntityManager\MetadataPool;
1616
use Magento\Store\Model\Store;
1717

18+
// phpcs:disable Magento2.Classes.AbstractApi
1819
/**
1920
* Class AbstractAction
2021
*

app/code/Magento/Catalog/Model/ResourceModel/Product.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,9 @@ public function getWebsiteIds($product)
227227
*/
228228
public function getWebsiteIdsByProductIds($productIds)
229229
{
230+
if (!is_array($productIds) || empty($productIds)) {
231+
return [];
232+
}
230233
$select = $this->getConnection()->select()->from(
231234
$this->getProductWebsiteTable(),
232235
['product_id', 'website_id']

0 commit comments

Comments
 (0)