From c1d3b08049a96563a15b8b405ad455b19ce6bac4 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Wed, 7 Jan 2009 15:32:35 -0600 Subject: [PATCH] bug 2747: avoid warning if items.itype is NULL Signed-off-by: Galen Charlton --- catalogue/detail.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/catalogue/detail.pl b/catalogue/detail.pl index 93b05fb002..393ec16691 100755 --- a/catalogue/detail.pl +++ b/catalogue/detail.pl @@ -112,7 +112,9 @@ foreach my $item (@items) { if ( defined $item->{'publictype'} ) { $item->{ $item->{'publictype'} } = 1; } - $item->{imageurl} = getitemtypeimagelocation( 'intranet', $itemtypes->{ $item->{itype} }{imageurl} ); + $item->{imageurl} = defined $item->{itype} ? getitemtypeimagelocation('intranet', $itemtypes->{ $item->{itype} }{imageurl}) + : ''; + foreach (qw(datedue datelastseen onloan)) { $item->{$_} = format_date($item->{$_}); } -- 2.39.5