Skip to content

Commit c3b4b3d

Browse files
authored
ENGCOM-3761: Resolved undefined index issue for import adapter #19765
2 parents 018a94b + 81e36a1 commit c3b4b3d

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/code/Magento/ImportExport/Model/Import/Entity/AbstractEntity.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,9 @@ protected function _saveValidatedBunches()
408408
if ($source->valid()) {
409409
try {
410410
$rowData = $source->current();
411-
$skuSet[$rowData['sku']] = true;
411+
if (array_key_exists('sku', $rowData)) {
412+
$skuSet[$rowData['sku']] = true;
413+
}
412414
} catch (\InvalidArgumentException $e) {
413415
$this->addRowError($e->getMessage(), $this->_processedRowsCount);
414416
$this->_processedRowsCount++;
@@ -436,7 +438,7 @@ protected function _saveValidatedBunches()
436438
$source->next();
437439
}
438440
}
439-
$this->_processedEntitiesCount = count($skuSet);
441+
$this->_processedEntitiesCount = (count($skuSet)) ? : $this->_processedRowsCount;
440442

441443
return $this;
442444
}

0 commit comments

Comments
 (0)