bug 2274 [5/5]: removing some warnings
running misc/cronjobs/overdue_notices.pl with warnings on has uncovered some warnings in C4::Members. This patch eliminates them. Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
parent
b5697e6fd1
commit
4e6eb990a3
1 changed files with 8 additions and 6 deletions
|
@ -637,11 +637,13 @@ sub ModMember {
|
||||||
my @parameters;
|
my @parameters;
|
||||||
|
|
||||||
# test to know if you must update or not the borrower password
|
# test to know if you must update or not the borrower password
|
||||||
if ( $data{'password'} eq '****' ) {
|
if ( exists $data{'password'} ) {
|
||||||
delete $data{'password'};
|
if ( $data{'password'} eq '****' ) {
|
||||||
} else {
|
delete $data{'password'};
|
||||||
$data{'password'} = md5_base64( $data{'password'} ) if ($data{'password'} ne "");
|
} else {
|
||||||
delete $data{'password'} if ($data{password} eq "");
|
$data{'password'} = md5_base64( $data{'password'} ) if ( $data{'password'} ne "" );
|
||||||
|
delete $data{'password'} if ( $data{password} eq "" );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
foreach (keys %data){
|
foreach (keys %data){
|
||||||
if ($_ ne 'borrowernumber' and $_ ne 'flags' and $hashborrowerfields{$_}){
|
if ($_ ne 'borrowernumber' and $_ ne 'flags' and $hashborrowerfields{$_}){
|
||||||
|
@ -661,7 +663,7 @@ sub ModMember {
|
||||||
# so when we update information for an adult we should check for guarantees and update the relevant part
|
# so when we update information for an adult we should check for guarantees and update the relevant part
|
||||||
# of their records, ie addresses and phone numbers
|
# of their records, ie addresses and phone numbers
|
||||||
my $borrowercategory= GetBorrowercategory( $data{'category_type'} );
|
my $borrowercategory= GetBorrowercategory( $data{'category_type'} );
|
||||||
if ( $borrowercategory->{'category_type'} eq ('A' || 'S') ) {
|
if ( exists $borrowercategory->{'category_type'} && $borrowercategory->{'category_type'} eq ('A' || 'S') ) {
|
||||||
# is adult check guarantees;
|
# is adult check guarantees;
|
||||||
UpdateGuarantees(%data);
|
UpdateGuarantees(%data);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue