We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 227cf92 commit 4bb1097Copy full SHA for 4bb1097
app/code/Magento/Eav/Model/Entity/Attribute/OptionManagement.php
@@ -93,8 +93,8 @@ public function update(
93
if (empty($optionId)) {
94
throw new InputException(__('The option id is empty. Enter the value and try again.'));
95
}
96
- $label = trim($option->getLabel() ?: '');
97
- if (empty($label)) {
+ $label = trim((string) $option->getLabel());
+ if ($label === '') {
98
throw new InputException(__('The attribute option label is empty. Enter the value and try again.'));
99
100
if ($attribute->getSource()->getOptionText($optionId) === false) {
0 commit comments