Skip to content

Commit

Permalink
Merge branch '1.4' into 1.x
Browse files Browse the repository at this point in the history
  • Loading branch information
mcop1 committed Apr 27, 2022
2 parents 30519ff + 5234080 commit eda12d8
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/Processing/ImportProcessingService.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,16 @@ public function processQueueItem(int $id)
$this->queueService->markQueueEntryAsProcessed($id);
}

private function flattenArray(array $arr): array
{
$flattenedArray = [];
array_walk_recursive($arr, function ($item, $key) use (&$flattenedArray) {
$flattenedArray[$key] = $item;
});

return $flattenedArray;
}

/**
* @param string $configName
* @param array $importDataRow
Expand All @@ -158,7 +168,7 @@ public function processQueueItem(int $id)
protected function processElement(string $configName, array $importDataRow, Resolver $resolver, array $mapping)
{
$element = null;
$importDataRowString = implode(', ', $importDataRow);
$importDataRowString = implode(', ', $this->flattenArray($importDataRow));
try {
//resolve data object
$createNew = true;
Expand Down

0 comments on commit eda12d8

Please sign in to comment.