X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/3c90e4c5f6a94d7486a0617d1bd77c417da12677..003e290ce67f1946ce9084a88b2e3380940d90c1:/SL/Helper/Csv.pm diff --git a/SL/Helper/Csv.pm b/SL/Helper/Csv.pm index 2444225ca..e9fd45c6a 100644 --- a/SL/Helper/Csv.pm +++ b/SL/Helper/Csv.pm @@ -239,6 +239,10 @@ sub _check_multiplex_datatype_position { } } +sub _is_empty_row { + return !!all { !$_ } @{$_[0]}; +} + sub _parse_data { my ($self, %params) = @_; my (@data, @errors); @@ -246,6 +250,7 @@ sub _parse_data { while (1) { my $row = $self->_csv->getline($self->_io); if ($row) { + next if _is_empty_row($row); my $header = $self->_header_by_row($row); if (!$header) { push @errors, [ @@ -497,7 +502,7 @@ See section L for information on this topic. =item C -If set, the import will ignore unkown header columns. Useful for lazy imports, +If set, the import will ignore unknown header columns. Useful for lazy imports, but deactivated by default. =item C