From efd9576afc2038c5c4a2cb8b0824b42340b9f02c Mon Sep 17 00:00:00 2001 From: Chris Pook Date: Wed, 10 Jan 2018 03:23:18 -0800 Subject: [PATCH 1/2] 11828 Fix issue with swatch colour block not showing in admin panel once colour selected (PHP7.1.x issue). --- .../Swatches/Block/Adminhtml/Attribute/Edit/Options/Visual.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Swatches/Block/Adminhtml/Attribute/Edit/Options/Visual.php b/app/code/Magento/Swatches/Block/Adminhtml/Attribute/Edit/Options/Visual.php index 306f01af17e71..79a666229d6f6 100644 --- a/app/code/Magento/Swatches/Block/Adminhtml/Attribute/Edit/Options/Visual.php +++ b/app/code/Magento/Swatches/Block/Adminhtml/Attribute/Edit/Options/Visual.php @@ -92,7 +92,7 @@ protected function reformatSwatchLabels($swatchStoreValue = null) if ($swatchStoreValue === null) { return; } - $newSwatch = ''; + $newSwatch = []; foreach ($swatchStoreValue as $key => $value) { if ($value[0] == '#') { $newSwatch[$key] = 'background: '.$value; From bfe1186851335142593f8c93c20c865eb05f7f5d Mon Sep 17 00:00:00 2001 From: Chris Pook Date: Wed, 10 Jan 2018 03:35:05 -0800 Subject: [PATCH 2/2] 11828 Updated docblock. --- .../Swatches/Block/Adminhtml/Attribute/Edit/Options/Visual.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Swatches/Block/Adminhtml/Attribute/Edit/Options/Visual.php b/app/code/Magento/Swatches/Block/Adminhtml/Attribute/Edit/Options/Visual.php index 79a666229d6f6..0e037dc08bb48 100644 --- a/app/code/Magento/Swatches/Block/Adminhtml/Attribute/Edit/Options/Visual.php +++ b/app/code/Magento/Swatches/Block/Adminhtml/Attribute/Edit/Options/Visual.php @@ -85,7 +85,7 @@ public function getJsonConfig() * * @codeCoverageIgnore * @param null $swatchStoreValue - * @return string + * @return array */ protected function reformatSwatchLabels($swatchStoreValue = null) {