Skip to content

Commit 15477af

Browse files
committed
Improve validation logic in server
1 parent 14eeea2 commit 15477af

File tree

1 file changed

+5
-0
lines changed
  • app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute

1 file changed

+5
-0
lines changed

app/code/Magento/Catalog/Controller/Adminhtml/Product/Attribute/Validate.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@ public function execute()
110110
$options
111111
);
112112
$valueOptions = (isset($options['value']) && is_array($options['value'])) ? $options['value'] : [];
113+
foreach ($valueOptions as $key => $val) {
114+
if (isset($options['delete'][$key]) && $options['delete'][$key]) {
115+
unset($valueOptions[$key]);
116+
}
117+
}
113118
$this->checkEmptyOption($response, $valueOptions);
114119
}
115120

0 commit comments

Comments
 (0)