projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5b77c5d
)
Csv-Helper: Fehlermeldung, wenn Header nicht erkannt wird (Multiplex-Dateien).
author
Bernd Bleßmann
<bernd@kivitendo-premium.de>
Mon, 14 Dec 2015 11:08:30 +0000
(12:08 +0100)
committer
Bernd Bleßmann
<bernd@kivitendo-premium.de>
Mon, 14 Dec 2015 12:12:06 +0000
(13:12 +0100)
SL/Helper/Csv.pm
patch
|
blob
|
history
diff --git
a/SL/Helper/Csv.pm
b/SL/Helper/Csv.pm
index
43aaabb
..
08ed9f4
100644
(file)
--- a/
SL/Helper/Csv.pm
+++ b/
SL/Helper/Csv.pm
@@
-245,6
+245,14
@@
sub _parse_data {
my $row = $self->_csv->getline($self->_io);
if ($row) {
my $header = $self->_header_by_row($row);
+ if (!$header) {
+ push @errors, [
+ 0,
+ "Cannot get header for row. Maybe row name and datatype field not matching.",
+ 0,
+ 0];
+ last;
+ }
my %hr;
@hr{@{ $header }} = @$row;
push @data, \%hr;