Skip to content

Commit a8207f9

Browse files
ENGCOM-3313: [Backport] Prevent exception when option text converts to false #18873
- Merge Pull Request #18873 from gelanivishal/magento2:2.2-develop-PR-port-18720 - Merged commits: 1. 06ca13a
2 parents 4421098 + 06ca13a commit a8207f9

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)