1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Fix for line break issue with import

This commit is contained in:
Hillel Coren 2017-10-31 19:40:33 +02:00
parent 40dbec0c97
commit ceeb642995

View File

@ -649,7 +649,8 @@ class ImportService
private function getCsvData($fileName)
{
$this->checkForFile($fileName);
$data = array_map('str_getcsv', file($fileName));
$file = file_get_contents($fileName);
$data = array_map("str_getcsv", preg_split('/\r*\n+|\r+/', $file));
if (count($data) > 0) {
$headers = $data[0];