These warnings were 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.
Use of uninitialized value in pattern match (m//) at
/usr/local/share/perl/5.10.1/OpenILS/WWW/EGCatLoader.pm line 250.
Banish them.
Signed-off-by: Dan Scott <dscott@laurentian.ca>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
$ctx->{full_path} = $ctx->{base_path} . $self->cgi->path_info;
$ctx->{unparsed_uri} = $self->apache->unparsed_uri;
$ctx->{opac_root} = $ctx->{base_path} . "/opac"; # absolute base url
- $ctx->{is_staff} = ($self->apache->headers_in->get('OILS-Wrapper') =~ /true/);
+ my $oils_wrapper = $self->apache->headers_in->get('OILS-Wrapper') || '';
+ $ctx->{is_staff} = ($oils_wrapper =~ /true/);
$ctx->{proto} = 'oils' if $ctx->{is_staff};
$ctx->{physical_loc} = $self->get_physical_loc;
$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 {