From b4f30f61c4d18699d3e5b7589ae517d61d885872 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Steffen=20Ro=C3=9Fkamp?= Date: Fri, 19 Jul 2019 15:27:21 +0200 Subject: [PATCH] Fix importer field indices --- Import/Importer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Import/Importer.php b/Import/Importer.php index 35ff13f..d8be640 100644 --- a/Import/Importer.php +++ b/Import/Importer.php @@ -116,7 +116,7 @@ public function init($file, $class, $delimiter = ',', $headerFormat = 'title'): */ public function import($fields): void { - $fields = $this->caseConverter->toPascalCase($fields); + $fields = array_values($this->caseConverter->toPascalCase($fields)); while ($row = $this->reader->getRow()) { if (0 !== $this->importCount && 0 === ($this->importCount % $this->batchSize)) { $result = $this->addRow($row, $fields, true);