Skip to content

Commit ba9a1b2

Browse files
VincentMarmiessegelanivishal
authored andcommitted
Label should always be blank even if attribute is required
1 parent 0f57a30 commit ba9a1b2

File tree

1 file changed

+5
-1
lines changed
  • app/code/Magento/Eav/Model/Entity/Attribute/Source

1 file changed

+5
-1
lines changed

app/code/Magento/Eav/Model/Entity/Attribute/Source/Table.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
use Magento\Framework\Escaper;
1111

1212
/**
13+
* Eav attribute default source when values are coming from another table
14+
*
1315
* @api
1416
* @since 100.0.2
1517
*/
@@ -136,12 +138,14 @@ public function getSpecificOptions($ids, $withEmpty = true)
136138
}
137139

138140
/**
141+
* Add an empty option to the array
142+
*
139143
* @param array $options
140144
* @return array
141145
*/
142146
private function addEmptyOption(array $options)
143147
{
144-
array_unshift($options, ['label' => $this->getAttribute()->getIsRequired() ? '' : ' ', 'value' => '']);
148+
array_unshift($options, ['label' => ' ', 'value' => '']);
145149
return $options;
146150
}
147151

0 commit comments

Comments
 (0)