From 1cd20471ba0ebd03ab8eff37460ef7cb99f53f2a Mon Sep 17 00:00:00 2001 From: Joshua Ferraro Date: Thu, 13 Dec 2007 04:28:35 -0600 Subject: [PATCH] fix for bug introduced recently if due_date is null, search failed --- C4/Search.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Search.pm b/C4/Search.pm index f004c9c75a..371d1aaef4 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1081,7 +1081,7 @@ sub searchResults { $item->{$code} = $field->subfield( $subfieldstosearch{$code} ); } $sth_issue->execute($item->{itemnumber}); - $item->{due_date} = format_date($sth_issue->fetchrow); + $item->{due_date} = format_date($sth_issue->fetchrow) if $sth_issue->fetchrow; $item->{onloan} = 1 if $item->{due_date}; # at least one item can be reserved : suppose no $norequests = 1; -- 2.39.5