From 159ad64ca850f8fb7ce2269c47393ac36095b529 Mon Sep 17 00:00:00 2001 From: Pascal Brouwers Date: Thu, 22 Sep 2016 16:18:36 +0200 Subject: [PATCH 1/2] Fix notice error --- app/code/Magento/Swatches/Model/Plugin/EavAttribute.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/code/Magento/Swatches/Model/Plugin/EavAttribute.php b/app/code/Magento/Swatches/Model/Plugin/EavAttribute.php index 72b07518190ac..5c83ebd6f562e 100644 --- a/app/code/Magento/Swatches/Model/Plugin/EavAttribute.php +++ b/app/code/Magento/Swatches/Model/Plugin/EavAttribute.php @@ -174,7 +174,7 @@ protected function prepareOptionIds(array $optionsArray) { if (isset($optionsArray['value']) && is_array($optionsArray['value'])) { foreach (array_keys($optionsArray['value']) as $optionId) { - if (isset($optionsArray['delete']) && $optionsArray['delete'][$optionId] == 1) { + if (isset($optionsArray['delete']) && isset($optionsArray['delete'][$optionId]) && $optionsArray['delete'][$optionId] == 1) { unset($optionsArray['value'][$optionId]); } } From 7f84cb5d726befeae9c341bbde58e9455ccbec65 Mon Sep 17 00:00:00 2001 From: Pascal Brouwers Date: Thu, 22 Sep 2016 16:42:24 +0200 Subject: [PATCH 2/2] Fix maximum limit of 120 characters per line --- app/code/Magento/Swatches/Model/Plugin/EavAttribute.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/code/Magento/Swatches/Model/Plugin/EavAttribute.php b/app/code/Magento/Swatches/Model/Plugin/EavAttribute.php index 5c83ebd6f562e..b8d41884ec448 100644 --- a/app/code/Magento/Swatches/Model/Plugin/EavAttribute.php +++ b/app/code/Magento/Swatches/Model/Plugin/EavAttribute.php @@ -174,7 +174,9 @@ protected function prepareOptionIds(array $optionsArray) { if (isset($optionsArray['value']) && is_array($optionsArray['value'])) { foreach (array_keys($optionsArray['value']) as $optionId) { - if (isset($optionsArray['delete']) && isset($optionsArray['delete'][$optionId]) && $optionsArray['delete'][$optionId] == 1) { + if (isset($optionsArray['delete']) && isset($optionsArray['delete'][$optionId]) + && $optionsArray['delete'][$optionId] == 1 + ) { unset($optionsArray['value'][$optionId]); } }