From ceeb642995f2b6c30c8f2c32d9897272aba24540 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Tue, 31 Oct 2017 19:40:33 +0200 Subject: [PATCH] Fix for line break issue with import --- app/Services/ImportService.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Services/ImportService.php b/app/Services/ImportService.php index 43366f2bfb..2a518c570d 100644 --- a/app/Services/ImportService.php +++ b/app/Services/ImportService.php @@ -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];