Skip to content

Commit

Permalink
Fix importer field indices
Browse files Browse the repository at this point in the history
  • Loading branch information
MisatoTremor committed Jul 19, 2019
1 parent 7e56467 commit b4f30f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Import/Importer.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit b4f30f6

Please sign in to comment.