diff -Nuar a/vendor/magento/module-eav/Model/Entity/Attribute/Backend/ArrayBackend.php b/vendor/magento/module-eav/Model/Entity/Attribute/Backend/ArrayBackend.php index 03c91f53287..11248309446 100644 --- a/vendor/magento/module-eav/Model/Entity/Attribute/Backend/ArrayBackend.php +++ b/vendor/magento/module-eav/Model/Entity/Attribute/Backend/ArrayBackend.php @@ -42,12 +42,15 @@ class ArrayBackend extends \Magento\Eav\Model\Entity\Attribute\Backend\AbstractB public function validate($object) { $attributeCode = $this->getAttribute()->getAttributeCode(); - $data = $object->getData($attributeCode); - if (is_array($data)) { - $object->setData($attributeCode, implode(',', array_filter($data))); - } elseif (empty($data)) { - $object->setData($attributeCode, null); + if ($object->hasData($attributeCode)) { + $data = $object->getData($attributeCode); + if (is_array($data)) { + $object->setData($attributeCode, implode(',', array_filter($data))); + } elseif (empty($data)) { + $object->setData($attributeCode, null); + } } + return parent::validate($object); } }