From 4c512b72df959102bdb190c21612d1800ca252ae Mon Sep 17 00:00:00 2001 From: erickson Date: Tue, 25 Nov 2008 13:56:18 +0000 Subject: [PATCH] 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 --- Open-ILS/src/perlmods/OpenILS/Application/Search/Z3950.pm | 3 +++ 1 file changed, 3 insertions(+) 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"); -- 2.11.0