From: erickson Date: Tue, 8 Jun 2010 16:15:49 +0000 (+0000) Subject: back-porting: protect against empty results from bib searches caused by search timeou... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=9a496304951a65d68d8d7c4ef88bf5ab986cb533;p=working%2FEvergreen.git back-porting: protect against empty results from bib searches caused by search timeouts. This allows the API call to log the error and return reasonable results git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_6@16626 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm b/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm index d834c4d2f9..750dc248c8 100644 --- a/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm @@ -950,7 +950,7 @@ sub staged_search { $results = $U->storagereq($method, %$search_hash); $search_duration = time - $start; $logger->info("staged search: DB call took $search_duration seconds"); - $summary = shift(@$results); + $summary = shift(@$results) if $results; unless($summary) { $logger->info("search timed out: duration=$search_duration: params=".