From: Moritz Bunkus Date: Thu, 11 Jul 2013 07:20:09 +0000 (+0200) Subject: SL::PrefixedNumber::set_to_max: mit undefinierten Werten klarkommen X-Git-Tag: release-3.1.0beta1~199 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=7fde0dcd49c0f63f336453866f1af7e89b4e7776;p=kivitendo-erp.git SL::PrefixedNumber::set_to_max: mit undefinierten Werten klarkommen --- diff --git a/SL/PrefixedNumber.pm b/SL/PrefixedNumber.pm index 849421f97..b3f609892 100644 --- a/SL/PrefixedNumber.pm +++ b/SL/PrefixedNumber.pm @@ -64,7 +64,7 @@ sub set_to { sub set_to_max { my ($self, @numbers) = @_; - return $self->set_to(max map { SL::PrefixedNumber->new(number => $_)->_state->{ref_number} } @numbers); + return $self->set_to(max map { SL::PrefixedNumber->new(number => $_ // 0)->_state->{ref_number} } @numbers); } 1;