Skip to content

Commit b4390ed

Browse files
committed
MC-21501: Investigation of stock quantity calculation for Configurable Products
- check $product is an instance of Product before processing
1 parent 2fcb9cd commit b4390ed

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dev/tests/integration/testsuite/Magento/Catalog/Model/Layer/Filter/_files/attribute_with_option_rollback.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
\Magento\Catalog\Model\Product::class
3333
);
3434
$product = $product->loadByAttribute('sku', 'simple_product_' . $option->getId());
35-
if ($product->getId()) {
35+
if ($product instanceof \Magento\Catalog\Model\Product && $product->getId()) {
3636
$product->delete();
3737
}
3838
}

0 commit comments

Comments
 (0)