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:
de935e1
)
AttrSorted-Helfer: Warnungen wegen nicht initialisierten Werten vermeiden
author
Moritz Bunkus
<m.bunkus@linet-services.de>
Fri, 30 Aug 2019 13:00:03 +0000
(15:00 +0200)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Fri, 30 Aug 2019 13:00:03 +0000
(15:00 +0200)
Durch Tests getriggert, konkret: durch t/controllers/csvimport/parts.t
SL/DB/Helper/AttrSorted.pm
patch
|
blob
|
history
diff --git
a/SL/DB/Helper/AttrSorted.pm
b/SL/DB/Helper/AttrSorted.pm
index
77c5f19
..
67c4441
100644
(file)
--- a/
SL/DB/Helper/AttrSorted.pm
+++ b/
SL/DB/Helper/AttrSorted.pm
@@
-29,7
+29,7
@@
sub _make_sorted {
croak 'not an accessor' if @_ > 1;
- my $next_position = (
max map { $_->$position_sub // 0 } @{ $self->$unsorted_sub }
) + 1;
+ my $next_position = (
(max map { $_->$position_sub // 0 } @{ $self->$unsorted_sub }) // 0
) + 1;
return [
map { $_->[1] }
sort { $a->[0] <=> $b->[0] }