Skip to content

Commit 4d9ee30

Browse files
ENGCOM-3592: 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] #19451
- Merge Pull Request #19451 from SikailoISM/magento2:Attribute-Option-with-zero-at-the-bigining-does-not-work - Merged commits: 1. 7e55ad5
2 parents 733f2fc + 7e55ad5 commit 4d9ee30

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)