From 0c37a958ff32fd394b8a60b33b4d218acf2f83ef 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 Signed-off-by: Bill Erickson --- .../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 cbfd99c1ef..6f627ba926 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 @@ -303,6 +303,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