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) private function getCsvData($fileName)
{ {
$this->checkForFile($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) { if (count($data) > 0) {
$headers = $data[0]; $headers = $data[0];