Skip to content

Commit 58b9536

Browse files
check subject and attribute set before continuing with interceptor
1 parent 07a95cc commit 58b9536

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

app/code/Magento/CatalogUrlRewrite/Plugin/Eav/Model/AttributeSetRepository.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ public function aroundDelete(
4747
callable $proceed,
4848
AttributeSetInterface $attributeSet
4949
) {
50+
if (!isset($subject) || !$attributeSet->getAttributeSetId())
51+
{
52+
return false;
53+
}
54+
5055
// Get the product ids
5156
$ids = $this->productCollection->addFieldToFilter('attribute_set_id', $attributeSet->getAttributeSetId())
5257
->getAllIds();

0 commit comments

Comments
 (0)