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 <julian.maurice@biblibre.com> Signed-off-by: Paul Poulain <paul.poulain@biblibre.com> Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This commit is contained in:
parent
2397702f62
commit
54d475bdcf
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue