Skip to content

Commit a38919a

Browse files
committed
Merge remote-tracking branch 'origin/MC-33699-CE-2' into MC-33699
2 parents b3d4e24 + d84d514 commit a38919a

File tree

1 file changed

+3
-3
lines changed
  • app/code/Magento/Swatches/Block/Adminhtml/Attribute/Edit/Options

1 file changed

+3
-3
lines changed

app/code/Magento/Swatches/Block/Adminhtml/Attribute/Edit/Options/Visual.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,10 +94,10 @@ protected function reformatSwatchLabels($swatchStoreValue = null)
9494
}
9595
$newSwatch = [];
9696
foreach ($swatchStoreValue as $key => $value) {
97-
if (is_string($value) && !empty($value)) {
98-
if ($value[0] == '#') {
97+
if (!empty($value) && is_string($value)) {
98+
if ($value[0] === '#') {
9999
$newSwatch[$key] = 'background: ' . $value;
100-
} elseif ($value[0] == '/') {
100+
} elseif ($value[0] === '/') {
101101
$mediaUrl = $this->swatchHelper->getSwatchMediaUrl();
102102
$newSwatch[$key] = 'background: url(' . $mediaUrl . $value . '); background-size: cover;';
103103
}

0 commit comments

Comments
 (0)