From 3aa6ef5091110861421b2090d2125341e8936aa8 Mon Sep 17 00:00:00 2001 From: Joe Atzberger Date: Mon, 22 Oct 2007 14:43:19 -0500 Subject: [PATCH] moremember.pl - partially addresses date bug 1477 Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- members/moremember.pl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/members/moremember.pl b/members/moremember.pl index 35edd8c823..93383cf0bb 100755 --- a/members/moremember.pl +++ b/members/moremember.pl @@ -92,8 +92,9 @@ my $category_type = $borrowercategory->{'category_type'}; $template->param( $data->{'categorycode'} => 1 ); foreach (qw(dateenrolled dateexpiry dateofbirth)) { - $data->{$_} = C4::Dates->new($data->{$_}, 'iso')->output() - or die ("failed C4::Dates->new(" . $data->{$_} . ", 'iso')->output()"); + my $tempdate = C4::Dates->new($data->{$_})->output('iso') + or warn ("Invalid $_ = " . $data->{$_}); + $data->{$_} = $tempdate || ''; } $data->{'IS_ADULT'} = ( $data->{'categorycode'} ne 'I' ); @@ -139,8 +140,8 @@ if ( $category_type eq 'A' ) { } else { if ($data->{'guarantorid'}){ - my ($guarantor) = GetMember( $data->{'guarantorid'},'biblionumber'); - $template->param(guarantor => 1); + my ($guarantor) = GetMember( $data->{'guarantorid'},'biblionumber'); + $template->param(guarantor => 1); foreach (qw(borrowernumber cardnumber firstname surname)) { $template->param("guarantor$_" => $guarantor->{$_}); } -- 2.39.5