From 84d6910d27d7f91ed82dce193501a4c36f37d79c 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 --- .../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 4fcbe5ee74..c41f163fe1 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.43.2