If the app settings for the open-ils.search service in opensrf.xml had
an empty (but not entirely missing) <default_CD_modifiers> element, then
the open-ils.storage log would contain entries like the following:
Use of uninitialized value $class in hash element at
/usr/local/share/perl5/OpenILS/Application/Storage/QueryParser.pm
Protect against that problem with more defensive code in QueryParser.pm.
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Dan Scott <dan@coffeecode.net>
my $default_CD_modifiers = OpenSRF::Utils::SettingsClient->new->config_value(
apps => 'open-ils.search' => app_settings => 'default_CD_modifiers'
);
- $args{query} = "$default_CD_modifiers $args{query}" if ($default_CD_modifiers);
+ # Protect against empty / missing default_CD_modifiers setting
+ if ($default_CD_modifiers and !ref($default_CD_modifiers)) {
+ $args{query} = "$default_CD_modifiers $args{query}";
+ }
my $simple_plan = $args{_simple_plan};
# remove bad chunks of the %args hash