Skip to content

Commit 19d849b

Browse files
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
- Merge Pull Request #19612 from SikailoISM/magento2:wrong-attribute-option - Merged commits: 1. 14aa091
2 parents b10cee9 + 14aa091 commit 19d849b

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)