From a4e2788bf997d9270661fd19070f481f5645cc61 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 13 Apr 2012 09:15:35 +0200 Subject: [PATCH 1/1] Bug 5347: Followup: FIX 2 bugs in lateorders 1/ Failed to claim late orders (Can't use string as a HASH ref) 2/ Don't show the red error message after submit the form for claims --- acqui/lateorders.pl | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/acqui/lateorders.pl b/acqui/lateorders.pl index 21ee186..a1c5e03 100755 --- a/acqui/lateorders.pl +++ b/acqui/lateorders.pl @@ -72,7 +72,7 @@ my $branch = $input->param('branch'); my $op = $input->param('op'); my @errors = (); -if ( defined $delay and not $delay =~ /^\d{1,3}$/ ) { +if ( $delay and not $delay =~ /^\d{1,3}$/ ) { push @errors, {delay_digits => 1, bad_delay => $delay}; } @@ -85,7 +85,7 @@ if ($op and $op eq "send_alert"){ }; if ( $@ ) { $template->param(error_claim => $@); - } elsif ( defined $err->{error} and $err->{error} eq "no_email" ) { + } elsif ( ref $err and exists $err->{error} and $err->{error} eq "no_email" ) { $template->{VARS}->{'error_claim'} = "no_email"; } else { $template->{VARS}->{'info_claim'} = 1; -- 1.7.7.3