Rollback 510071550a
This issue has been addressed too early in the process lifecycle. The line number should be incremented later, say in the view layer when the error is displayed. A simple helper to determine what the index increment should do well. $row + $indexIncrement This is so we don't have to rebuild the array, which is computationally expensive for large datasets and could be frustrating for a developer expecting untouched index values, or likewise needing to prepare our special format.
This commit is contained in:
parent
510071550a
commit
d30dd19b70
|
|
@ -146,16 +146,6 @@ abstract class ImportModel extends Model
|
|||
foreach ($contents as $row) {
|
||||
$result[] = $this->processImportRow($row, $matches);
|
||||
}
|
||||
|
||||
// Offset the array index in order to have the correct row index in error logs
|
||||
if ($options['firstRowTitles']) {
|
||||
array_unshift($result, [], []);
|
||||
unset($result[0]);
|
||||
unset($result[1]);
|
||||
} else {
|
||||
array_unshift($result, []);
|
||||
unset($result[0]);
|
||||
}
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue