From 55e62cb268e2435dfa052027229e635a243defd6 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 f9c88df6b0..dba3706e0e 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Z3950.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Search/Z3950.pm @@ -277,10 +277,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