Merge branch 'wip-MDL-36113-master' of git://github.com/abgreeve/moodle
Conflicts: lib/tests/csvclass_test.php
This commit is contained in:
@@ -110,7 +110,15 @@ class csv_import_reader {
|
||||
// str_getcsv doesn't iterate through the csv data properly. It has
|
||||
// problems with line returns.
|
||||
while ($fgetdata = fgetcsv($fp, 0, $csv_delimiter, $enclosure)) {
|
||||
$columns[] = $fgetdata;
|
||||
// Check to see if we have an empty line.
|
||||
if (count($fgetdata) == 1) {
|
||||
if ($fgetdata[0] !== null) {
|
||||
// The element has data. Add it to the array.
|
||||
$columns[] = $fgetdata;
|
||||
}
|
||||
} else {
|
||||
$columns[] = $fgetdata;
|
||||
}
|
||||
}
|
||||
$col_count = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user