Skip to content

Commit 2ac007c

Browse files
author
Stanislav Idolov
authored
ENGCOM-3313: [Backport] Prevent exception when option text converts to false #18873
2 parents 3e504af + a8207f9 commit 2ac007c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/code/Magento/Eav/Model/Entity/Attribute/OptionManagement.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public function getItems($entityType, $attributeCode)
132132
*/
133133
protected function validateOption($attribute, $optionId)
134134
{
135-
if (!$attribute->getSource()->getOptionText($optionId)) {
135+
if ($attribute->getSource()->getOptionText($optionId) === false) {
136136
throw new NoSuchEntityException(
137137
__('Attribute %1 does not contain option with Id %2', $attribute->getAttributeCode(), $optionId)
138138
);

0 commit comments

Comments
 (0)