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:
Andrew Moore 2008-07-09 11:56:43 -05:00 committed by Joshua Ferraro
parent b5697e6fd1
commit 4e6eb990a3

View file

@ -637,11 +637,13 @@ sub ModMember {
my @parameters;
# test to know if you must update or not the borrower password
if ( $data{'password'} eq '****' ) {
delete $data{'password'};
} else {
$data{'password'} = md5_base64( $data{'password'} ) if ($data{'password'} ne "");
delete $data{'password'} if ($data{password} eq "");
if ( exists $data{'password'} ) {
if ( $data{'password'} eq '****' ) {
delete $data{'password'};
} else {
$data{'password'} = md5_base64( $data{'password'} ) if ( $data{'password'} ne "" );
delete $data{'password'} if ( $data{password} eq "" );
}
}
foreach (keys %data){
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
# of their records, ie addresses and phone numbers
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;
UpdateGuarantees(%data);
}