From a0e189c34491b3c01f2df7314e968ddbce1684f9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?St=C3=A9phane=20Delaune?= <stephane.delaune@biblibre.com>
Date: Thu, 3 May 2012 13:46:51 +0200
Subject: [PATCH] Bug 8041: lost items are no longer available in search

---
 C4/Search.pm |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/C4/Search.pm b/C4/Search.pm
index 33a1d16..ce7c987 100644
--- a/C4/Search.pm
+++ b/C4/Search.pm
@@ -1740,7 +1740,7 @@ sub searchResults {
                     }
                     $other_items->{$key}->{intransit} = ( $transfertwhen ne '' ) ? 1 : 0;
                     $other_items->{$key}->{onhold} = ($reservestatus) ? 1 : 0;
-					$other_items->{$key}->{notforloan} = GetAuthorisedValueDesc('','',$item->{notforloan},'','',$notforloan_authorised_value) if $notforloan_authorised_value;
+					$other_items->{$key}->{notforloan} = GetAuthorisedValueDesc('','',$item->{notforloan},'','',$notforloan_authorised_value) if $notforloan_authorised_value and $item->{notforloan};
 					$other_items->{$key}->{count}++ if $item->{$hbranch};
 					$other_items->{$key}->{location} = $shelflocations->{ $item->{location} };
 					$other_items->{$key}->{description} = $item->{description};
-- 
1.7.9.5