Skip to content

Commit fc2c797

Browse files
committed
Merge remote-tracking branch 'mainline/2.3.2-develop' into MC-16644
2 parents d8e7d96 + ba04983 commit fc2c797

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/code/Magento/Catalog/Model/Category.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -948,10 +948,10 @@ public function beforeSave()
948948
)
949949
&& !$this->authorization->isAllowed('Magento_Catalog::edit_category_design')
950950
) {
951-
$this->getCustomAttributes();
952951
foreach ($this->_designAttributes as $attributeCode) {
953952
$this->setData($attributeCode, $value = $this->getOrigData($attributeCode));
954-
if (array_key_exists($attributeCode, $this->_data[self::CUSTOM_ATTRIBUTES])) {
953+
if (!empty($this->_data[self::CUSTOM_ATTRIBUTES])
954+
&& array_key_exists($attributeCode, $this->_data[self::CUSTOM_ATTRIBUTES])) {
955955
//In case custom attribute were used to update the entity.
956956
$this->_data[self::CUSTOM_ATTRIBUTES][$attributeCode]->setValue($value);
957957
}

0 commit comments

Comments
 (0)