From 8db836b16fa92aeed478173b7ad857f51cd70591 Mon Sep 17 00:00:00 2001 From: Tadhg Bowe Date: Sat, 7 Jul 2018 15:11:33 +0100 Subject: [PATCH] import-export-improvements #82 : configurable variations - not a super attribute error message improvements - code styling Travis CI build fixes --- .../Model/Import/Product/Type/Configurable.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/code/Magento/ConfigurableImportExport/Model/Import/Product/Type/Configurable.php b/app/code/Magento/ConfigurableImportExport/Model/Import/Product/Type/Configurable.php index 5969f872616e0..fdbd8560c2664 100644 --- a/app/code/Magento/ConfigurableImportExport/Model/Import/Product/Type/Configurable.php +++ b/app/code/Magento/ConfigurableImportExport/Model/Import/Product/Type/Configurable.php @@ -336,7 +336,7 @@ private function identifySuperAttributeError($superAttrCode, $rowNum) // Does this attribute code exist? $sourceAttribute = $this->doesSuperAttributeExist($superAttrCode); - if (!is_null($sourceAttribute)) { + if (is_array($sourceAttribute)) { $codeExists = true; // Does attribute have the correct settings? if (isset($sourceAttribute['is_global']) && $sourceAttribute['is_global'] !== '1') { @@ -374,8 +374,7 @@ function ($element) use ($superAttrCode) { ); // Return the first element of the filtered array (if found). - if (count($filteredAttribute)) - { + if (count($filteredAttribute)) { $returnAttributeArray = array_shift($filteredAttribute); } }