We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 821e2dc commit 2808b89Copy full SHA for 2808b89
app/code/Magento/Catalog/Ui/DataProvider/Product/Form/Modifier/Eav.php
@@ -540,8 +540,9 @@ private function isProductNew()
540
*/
541
private function isProductHasValueForAttribute(ProductAttributeInterface $attribute)
542
{
543
- return (bool)($this->locator->getProduct()->getCustomAttribute($attribute->getAttributeCode()) !== null)
544
- && $this->locator->getProduct()->getCustomAttribute($attribute->getAttributeCode())->getValue();
+ /** @var \Magento\Framework\Api\AttributeInterface $attributeCode */
+ $attributeCode = $this->locator->getProduct()->getCustomAttribute($attribute->getAttributeCode());
545
+ return (bool)($attributeCode !== null) && $attributeCode->getValue();
546
}
547
548
/**
0 commit comments