Skip to content

Commit 49883b7

Browse files
authored
ENGCOM-3691: [Backport] Fix: Attribute Option with zero at the beginning does not work if there is already option with the same number without the zero [REST API] #19612
2 parents 12e4ec2 + 19d849b commit 49883b7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/Catalog/Model/Product/Attribute/OptionManagement.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public function add($attributeCode, $option)
4747
/** @var \Magento\Eav\Api\Data\AttributeOptionInterface $attributeOption */
4848
$attributeOption = $attributeOption->getLabel();
4949
});
50-
if (in_array($option->getLabel(), $currentOptions)) {
50+
if (in_array($option->getLabel(), $currentOptions, true)) {
5151
return false;
5252
}
5353
}

0 commit comments

Comments
 (0)