From 4e6eb990a3bff319476be2c217b2545392d15357 Mon Sep 17 00:00:00 2001 From: Andrew Moore Date: Wed, 9 Jul 2008 11:56:43 -0500 Subject: [PATCH] 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 --- C4/Members.pm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/C4/Members.pm b/C4/Members.pm index 8f27e8e87b..5229c0d680 100644 --- a/C4/Members.pm +++ b/C4/Members.pm @@ -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); }