Skip to content

Commit 84e649e

Browse files
authored
Update EavAttribute.php
The existence of $optionsArray['delete'] does not guarantee the existence of $optionsArray['delete'][$optionId]
1 parent 619ac30 commit 84e649e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/Swatches/Model/Plugin/EavAttribute.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ protected function prepareOptionIds(array $optionsArray)
174174
{
175175
if (isset($optionsArray['value']) && is_array($optionsArray['value'])) {
176176
foreach (array_keys($optionsArray['value']) as $optionId) {
177-
if (isset($optionsArray['delete']) && $optionsArray['delete'][$optionId] == 1) {
177+
if (isset($optionsArray['delete'][$optionId]) && $optionsArray['delete'][$optionId] == 1) {
178178
unset($optionsArray['value'][$optionId]);
179179
}
180180
}

0 commit comments

Comments
 (0)