From ac40d43e4a51ad235b4817d09f28cb50869c13a1 Mon Sep 17 00:00:00 2001 From: Wojtek Naruniec Date: Mon, 11 Feb 2019 13:45:13 +0100 Subject: [PATCH] Add missing attributes initialization to avoid throwing foreach error --- app/code/Magento/Eav/Model/Form.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/code/Magento/Eav/Model/Form.php b/app/code/Magento/Eav/Model/Form.php index c8c50521f5509..1d867109aaf38 100644 --- a/app/code/Magento/Eav/Model/Form.php +++ b/app/code/Magento/Eav/Model/Form.php @@ -323,6 +323,8 @@ public function getAttributes() if ($this->_attributes === null) { $this->_attributes = []; $this->_userAttributes = []; + $this->_systemAttributes = []; + $this->_allowedAttributes = []; /** @var $attribute \Magento\Eav\Model\Attribute */ foreach ($this->_getFilteredFormAttributeCollection() as $attribute) { $this->_attributes[$attribute->getAttributeCode()] = $attribute;