From: Dan Scott Date: Mon, 24 Jun 2013 14:12:50 +0000 (-0400) Subject: Avoid Z39.50 search warning for uninit var X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=55e62cb268e2435dfa052027229e635a243defd6;p=evergreen%2Fpines.git 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 --- 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");