Skip to content

Commit 02f7fa0

Browse files
author
Mike Bijnsdorp
committed
Apply label change to add method
1 parent 6921b30 commit 02f7fa0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ public function add($entityType, $attributeCode, $option)
6060
{
6161
$attribute = $this->loadAttribute($entityType, (string)$attributeCode);
6262

63-
$label = trim($option->getLabel() ?: '');
64-
if (empty($label)) {
63+
$label = trim((string) $option->getLabel());
64+
if ($label === '') {
6565
throw new InputException(__('The attribute option label is empty. Enter the value and try again.'));
6666
}
6767

0 commit comments

Comments
 (0)