From: erickson Date: Tue, 25 Nov 2008 13:56:18 +0000 (+0000) Subject: don't test undefined connections, which can happen when non-supported search types... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=4c512b72df959102bdb190c21612d1800ca252ae;p=Evergreen.git don't test undefined connections, which can happen when non-supported search types are requested (e.g. loc => keyword) git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_4@11331 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm b/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm index bcab051323..db136a8b23 100755 --- a/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm +++ b/Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm @@ -217,6 +217,9 @@ sub do_class_search { # local catalog search is not processed with other z39 results; $$args{service} = [grep {$_ ne 'native-evergreen-catalog'} @{$$args{service}}]; + @connections = grep {defined $_} @connections; + return undef unless @connections; + while ((my $index = OpenILS::Utils::ZClient::event( \@connections )) != 0) { my $ev = $connections[$index - 1]->last_event(); $logger->debug("z3950: Received event $ev");