From 1bb05b3732643ddbbc0a4ca4ef1553ef44749fc0 Mon Sep 17 00:00:00 2001 From: Dan Scott Date: Thu, 20 Jun 2013 23:11:20 -0400 Subject: [PATCH] Silence uninit var warnings from query normalizer $field_info can return undef from the search for a matching ID from the list of normalizers, which in turn generates several uninit var warnings when attempts are made to access members of the undef variable. We saw 6700 occurrences of these warnings during a typical day of operations. Signed-off-by: Dan Scott --- .../perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm index f50ab0bebe..431e26f38b 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Storage/Driver/Pg/QueryParser.pm @@ -415,6 +415,7 @@ sub initialize_query_normalizers { for my $cmfinm ( @$tree ) { my $field_info = $self->search_field_class_by_id( $cmfinm->field ); + next unless $field_info; __PACKAGE__->add_query_normalizer( $field_info->{classname}, $field_info->{field}, $cmfinm->norm->func, OpenSRF::Utils::JSON->JSON2perl($cmfinm->params) ); } } -- 2.11.0