From bfa3f410320e6baad98f277a6cfd9b41a4d68dac Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 19 Dec 2016 12:52:27 -0300 Subject: [PATCH] Bug 13757: (followup) Remove warnings Signed-off-by: Tomas Cohen Arazi Signed-off-by: Nick Clemens Signed-off-by: Jonathan Druart Signed-off-by: Kyle M Hall --- opac/opac-memberentry.pl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/opac/opac-memberentry.pl b/opac/opac-memberentry.pl index 2100ca827a..6883724d9d 100755 --- a/opac/opac-memberentry.pl +++ b/opac/opac-memberentry.pl @@ -401,8 +401,10 @@ sub CheckForInvalidFields { if ($borrower->{'B_email'}) { push(@invalidFields, "B_email") if (!Email::Valid->address($borrower->{'B_email'})); } - if ( $borrower->{'password'} ne $borrower->{'password2'} ){ - push(@invalidFields, "password_match"); + if ( defined $borrower->{'password'} + and $borrower->{'password'} ne $borrower->{'password2'} ) + { + push( @invalidFields, "password_match" ); } if ( $borrower->{'password'} && $minpw && (length($borrower->{'password'}) < $minpw) ) { push(@invalidFields, "password_invalid"); @@ -534,9 +536,9 @@ sub GeneratePatronAttributesForm { sub ParsePatronAttributes { my ( $cgi ) = @_; - my @codes = $cgi->param('patron_attribute_code'); - my @values = $cgi->param('patron_attribute_value'); - my @passwords = $cgi->param('patron_attribute_password'); + my @codes = $cgi->multi_param('patron_attribute_code'); + my @values = $cgi->multi_param('patron_attribute_value'); + my @passwords = $cgi->multi_param('patron_attribute_password'); my $ea = each_array( @codes, @values, @passwords ); my @attributes; -- 2.39.5