From: erickson Date: Tue, 8 Jun 2010 19:14:27 +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=01c710bf7473995bf1556a265fa28eb85c18a38b;p=Evergreen.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_0@16627 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=".