mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fix for line break issue with import
This commit is contained in:
parent
40dbec0c97
commit
ceeb642995
@ -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];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user