From 1abf1ea2d009b15762bacd764fa5f66f915c6283 Mon Sep 17 00:00:00 2001 From: Paul Poulain Date: Tue, 14 Dec 2010 21:07:08 +0100 Subject: [PATCH] Bug 5731 When No ccode is defined for an item, then moredetail.pl throws a 500 error Signed-off-by: Chris Cormack --- catalogue/moredetail.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/catalogue/moredetail.pl b/catalogue/moredetail.pl index d790c41987..4f40b04b04 100755 --- a/catalogue/moredetail.pl +++ b/catalogue/moredetail.pl @@ -87,7 +87,7 @@ my $itemnumber; foreach my $item (@items){ $item->{itemlostloop}= GetAuthorisedValues(GetAuthValCode('items.itemlost',$fw),$item->{itemlost}) if GetAuthValCode('items.itemlost',$fw); $item->{itemdamagedloop}= GetAuthorisedValues(GetAuthValCode('items.damaged',$fw),$item->{damaged}) if GetAuthValCode('items.damaged',$fw); - $item->{'collection'} = $ccodes->{ $item->{ccode} }; + $item->{'collection'} = $ccodes->{ $item->{ccode} } if ($ccodes); $item->{'itype'} = $itemtypes->{ $item->{'itype'} }->{'description'}; $item->{'replacementprice'} = sprintf( "%.2f", $item->{'replacementprice'} ); $item->{'datelastborrowed'} = format_date( $item->{'datelastborrowed'} ); -- 2.39.5