X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=sidebyside;f=SL%2FHelper%2FCsv.pm;h=e9fd45c6a24106cc850442f86d692e22ddb4969c;hb=70df0cd4ae810763e2602db901f6753a29e039eb;hp=2444225ca370d59ea4f18b8f5f42ce0e97817860;hpb=3c90e4c5f6a94d7486a0617d1bd77c417da12677;p=kivitendo-erp.git 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