From 514f5db19fe344bd2dde184a8c96f875ec2e1b88 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 Signed-off-by: Mike Rylander --- 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