From 55b1c06b171dab857d7a98f7157147e274ec227a Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 8 May 2012 15:49:10 -0400 Subject: [PATCH] Bug 8057 - Error when adding a patron with email address Caused by code assuming a the variable $err is a hashref when it is only a hashref if there is an error. Signed-off-by: Julian Maurice Signed-off-by: Paul Poulain --- members/memberentry.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/members/memberentry.pl b/members/memberentry.pl index 2d8caceedb..c8a6be190f 100755 --- a/members/memberentry.pl +++ b/members/memberentry.pl @@ -354,7 +354,7 @@ if ((!$nok) and $nodouble and ($op eq 'insert' or $op eq 'save')){ }; if ( $@ ) { $template->param(error_alert => $@); - } elsif ( defined $err->{error} and $err->{error} eq "no_email" ) { + } elsif ( ref($err) eq "HASH" && defined $err->{error} and $err->{error} eq "no_email" ) { $template->{VARS}->{'error_alert'} = "no_email"; } else { $template->{VARS}->{'info_alert'} = 1; -- 2.39.5