From: Sven Schöling Date: Fri, 4 Sep 2009 11:42:09 +0000 (+0200) Subject: Möglicher Division by zero abgefangen. X-Git-Tag: release-2.6.1beta1~295 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=f7a568a1f68437311649595c50bc17d332536f82;p=kivitendo-erp.git Möglicher Division by zero abgefangen. Fix für Bug 1051. --- diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index 7d2494324..25427f71d 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -262,7 +262,7 @@ sub display_row { if ($form->{"id_$i"}) { my $ship_qty = $form->{"ship_$i"} * 1; $ship_qty *= $all_units->{$form->{"partunit_$i"}}->{factor}; - $ship_qty /= $all_units->{$form->{"unit_$i"}}->{factor}; + $ship_qty /= ( $all_units->{$form->{"unit_$i"}}->{factor} || 1 ); $column_data{ship} = $form->format_amount(\%myconfig, $form->round_amount($ship_qty, 2) * 1) . ' ' . $form->{"unit_$i"}; }