Skip to content

Commit

Permalink
Add missing attributes initialization to avoid throwing foreach error
Browse files Browse the repository at this point in the history
  • Loading branch information
wojtekn committed Feb 11, 2019
1 parent 4cdcb74 commit ac40d43
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions app/code/Magento/Eav/Model/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ac40d43

Please sign in to comment.