From ff8237d228e0dd45c65409e117c9a03047a6b4cc Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Mon, 24 Jun 2013 10:12:50 -0400 Subject: [PATCH] Avoid Z39.50 search warning for uninit var The debug log blindly attempts to access list members that might not exist (if, for example, an event code was returned from the attempt to run do_service_search()), thus generating spurious log warnings. Instead, move the debug line to only generate output when we have created the list item in question. Signed-off-by: Dan Scott --- Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Z3950.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Z3950.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Z3950.pm index 1f17a0ccc0..2fa73ff0a9 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Z3950.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Z3950.pm @@ -274,10 +274,11 @@ sub do_class_search { push @services, $tmp_args{service}; push @results, $res->{result}; push @connections, $res->{connection}; + + $logger->debug("z3950: Result object: $results[$i], Connection object: $connections[$i]"); } } - $logger->debug("z3950: Result object: $results[$i], Connection object: $connections[$i]"); } $logger->debug("z3950: Connections created"); -- 2.11.0