[Koha-patches] [PATCH] bug 2747: avoid warning if items.itype is NULL
Galen Charlton
galen.charlton at liblime.com
Wed Jan 7 22:32:48 CET 2009
---
catalogue/detail.pl | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/catalogue/detail.pl b/catalogue/detail.pl
index 93b05fb..393ec16 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->{$_});
}
--
1.5.5.GIT
More information about the Koha-patches
mailing list