Skip to content

Commit

Permalink
Add support for league/csv:^9.0
Browse files Browse the repository at this point in the history
  • Loading branch information
engram-design committed Feb 21, 2019
1 parent b83a44f commit 48c857b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/datatypes/Csv.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,14 @@ private function _getRows($reader)
}
} catch (\Throwable $e) {}

// Support league/csv v9 syntax
try {
if (!$array) {
$reader->setHeaderOffset(0);
$array = $reader->getRecords();
}
} catch (\Throwable $e) {}

return $array;
}

Expand Down

0 comments on commit 48c857b

Please sign in to comment.