Commit b1f70642 authored by Sebastian Castro's avatar Sebastian Castro

Handle better error on csv parsing

parent 51ff7830
......@@ -80,7 +80,11 @@ class ElementImportService
// Getting php array of data from CSV
$data = $this->converter->convert($fileName, ',');
if (!$data) return "Cannot open the CSV file";
if (!$data) {
$import->setCurrMessage("Impossible d'ouvrir le fichier CSV. Vérifiez que le fichier utilise des virgules comme séparateur");
return "Cannot open the CSV file";
return $this->importData($data, $import);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment