CSV import : ignores the file blank lines (submitted by Laurent Bigonville)

skala
Noel Dieschburg 16 years ago
parent 8c808f5732
commit 00ada90163
  1. 7
      main/inc/lib/import.lib.php

@ -57,14 +57,17 @@ class Import
$row = array ();
//avoid empty lines in csv
if (is_array($row_tmp) && count($row_tmp)>0 && $row_tmp[0]!= '') {
if (!is_null($row_tmp[0]))
{
foreach ($row_tmp as $index => $value) {
$row[$keys[$index]] = $value;
}
$result[] = $row;
}
}
}
}
fclose($handle);
return $result;
}
}
?>
?>

Loading…
Cancel
Save