diff --git a/acqui/lateorders.pl b/acqui/lateorders.pl index e2e0ee21db..5dc9ea6e33 100755 --- a/acqui/lateorders.pl +++ b/acqui/lateorders.pl @@ -112,12 +112,12 @@ if ($op and $op eq "send_alert"){ } }; - if ( $@ ) { - $template->param(error_claim => $@); - } elsif ( ref $err and exists $err->{error} and $err->{error} eq "no_email" ) { + if ( ref $err and exists $err->{error} and $err->{error} eq "no_email" ) { $template->{VARS}->{'error_claim'} = "no_email"; } elsif ( ref $err and exists $err->{error} and $err->{error} eq "no_order_selected"){ $template->{VARS}->{'error_claim'} = "no_order_selected"; + } elsif ( $@ or ref $err and exists $err->{error} ) { + $template->param(error_claim => $@ || $err->{error}); } else { $template->{VARS}->{'info_claim'} = 1; }