]> wagnertech.de Git - mfinanz.git/blobdiff - SL/AM.pm
strict Sanity
[mfinanz.git] / SL / AM.pm
index 7b3b7368ac8e62153eb67dcacae78bf90254d3b4..6c0ea0b4270b27504b57aa0c96801c31a01b1d06 100644 (file)
--- a/SL/AM.pm
+++ b/SL/AM.pm
@@ -1515,7 +1515,7 @@ sub save_preferences {
 
   $form->{businessnumber} =  $businessnumber;
 
-  my $myconfig = new User($form->{login});
+  $myconfig = new User($form->{login});
 
   foreach my $item (keys %$form) {
     $myconfig->{$item} = $form->{$item};
@@ -1935,9 +1935,10 @@ sub convert_unit {
   $main::lxdebug->enter_sub(2);
   ($this, $a, $b, $all_units) = @_;
 
+  $main::lxdebug->leave_sub(2) and return 0 unless $a && $b;
   $main::lxdebug->leave_sub(2) and return 0 unless $all_units->{$a} && $all_units->{$b};
   $main::lxdebug->leave_sub(2) and return 0 unless $all_units->{$a}{base_unit} eq $all_units->{$b}{base_unit};
-  $main::lxdebug->leave_sub(2) and return $all_units->{$a}{factor} / $all_units->{$b}{factor}; 
+  $main::lxdebug->leave_sub(2) and return $all_units->{$a}{factor} / $all_units->{$b}{factor};
 }
 
 sub unit_select_data {