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 c658468 commit d84d514Copy full SHA for d84d514
app/code/Magento/Swatches/Block/Adminhtml/Attribute/Edit/Options/Visual.php
@@ -94,10 +94,10 @@ protected function reformatSwatchLabels($swatchStoreValue = null)
94
}
95
$newSwatch = [];
96
foreach ($swatchStoreValue as $key => $value) {
97
- if (is_string($value) && !empty($value)) {
98
- if ($value[0] == '#') {
+ if (!empty($value) && is_string($value)) {
+ if ($value[0] === '#') {
99
$newSwatch[$key] = 'background: ' . $value;
100
- } elseif ($value[0] == '/') {
+ } elseif ($value[0] === '/') {
101
$mediaUrl = $this->swatchHelper->getSwatchMediaUrl();
102
$newSwatch[$key] = 'background: url(' . $mediaUrl . $value . '); background-size: cover;';
103
0 commit comments