Bug 7336 - memberentry.pl generates an error in the log

Adding check for the existence of a variable in
order to quiet errors in the log.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Nighswonger <chris.nighswonger@gmail.com>
This commit is contained in:
Owen Leonard 2011-12-08 11:10:20 -05:00 committed by Chris Nighswonger
parent 8b24f1d41c
commit be1db4628e
1 changed files with 4 additions and 1 deletions

View File

@ -633,7 +633,10 @@ if (C4::Context->preference('uppercasesurnames')) {
$data{'surname'} =uc($data{'surname'} );
$data{'contactname'}=uc($data{'contactname'});
}
foreach (qw(dateenrolled dateexpiry dateofbirth)) {
$data{debarred} = C4::Overdues::CheckBorrowerDebarred($borrowernumber);
$data{datedebarred} = $data{debarred} if ( $data{debarred} && $data{debarred} ne "9999-12-31" );
foreach (qw(dateenrolled dateexpiry dateofbirth datedebarred)) {
$data{$_} = format_date($data{$_}); # back to syspref for display
$template->param( $_ => $data{$_});
}