Skip to content

Commit

Permalink
ENGCOM-5030: [Backport] Resolved undefined index issue for import ada…
Browse files Browse the repository at this point in the history
  • Loading branch information
sidolov authored May 21, 2019
2 parents d487541 + f3c81f7 commit 562e989
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,9 @@ protected function _saveValidatedBunches()
if ($source->valid()) {
try {
$rowData = $source->current();
$skuSet[$rowData['sku']] = true;
if (array_key_exists('sku', $rowData)) {
$skuSet[$rowData['sku']] = true;
}
} catch (\InvalidArgumentException $e) {
$this->addRowError($e->getMessage(), $this->_processedRowsCount);
$this->_processedRowsCount++;
Expand Down Expand Up @@ -436,7 +438,7 @@ protected function _saveValidatedBunches()
$source->next();
}
}
$this->_processedEntitiesCount = count($skuSet);
$this->_processedEntitiesCount = (count($skuSet)) ? : $this->_processedRowsCount;

return $this;
}
Expand Down

0 comments on commit 562e989

Please sign in to comment.