Skip to content

Commit cce380b

Browse files
author
Stanislav Idolov
authored
ENGCOM-3236: Prevent exception when option text converts to false #18720
2 parents 9c67298 + 65dcdc5 commit cce380b

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
@@ -141,7 +141,7 @@ public function getItems($entityType, $attributeCode)
141141
*/
142142
protected function validateOption($attribute, $optionId)
143143
{
144-
if (!$attribute->getSource()->getOptionText($optionId)) {
144+
if ($attribute->getSource()->getOptionText($optionId) === false) {
145145
throw new NoSuchEntityException(
146146
__(
147147
'The "%1" attribute doesn\'t include an option with "%2" ID.',

0 commit comments

Comments
 (0)