From: Bill Erickson Date: Wed, 15 Aug 2012 17:21:24 +0000 (-0400) Subject: TPAC: Silence one uninit variable warning X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=refs%2Fheads%2Fuser%2Fberick%2Ftpac_silence_warning_2.2;p=working%2FEvergreen.git TPAC: Silence one uninit variable warning This warning was being thrown on every TPAC page request, slowly filling the logs: Use of uninitialized value $set_locale in string eq at /usr/local/share/perl/5.10.1/OpenILS/WWW/EGWeb.pm line 159. Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm index 71a520ce28..984d232b27 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm @@ -155,7 +155,7 @@ sub load_context { $ctx->{locales} = \%registered_locales; # Set a locale cookie if the requested locale is valid - my $set_locale = $cgi->param('set_eg_locale'); + my $set_locale = $cgi->param('set_eg_locale') || ''; if (!(grep {$_ eq $set_locale} keys %registered_locales)) { $set_locale = ''; } else {