Skip to content

Commit

Permalink
ENGCOM-3761: Resolved undefined index issue for import adapter #19765
Browse files Browse the repository at this point in the history
  • Loading branch information
sidolov authored Apr 3, 2019
2 parents 018a94b + 81e36a1 commit c3b4b3d
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 c3b4b3d

Please sign in to comment.