From bc44473b16fe1fc52f1a666c29ef16e91fd30162 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 15 Aug 2018 15:17:57 -0300 Subject: [PATCH] Bug 19991: Remove warning from opac-user Use of uninitialized value in split at /home/vagrant/kohaclone/opac/opac-user.pl line 78. Use of uninitialized value $search_query in string ne at /home/vagrant/kohaclone/opac/opac-user.pl line 367. Signed-off-by: Jonathan Druart --- opac/opac-user.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/opac/opac-user.pl b/opac/opac-user.pl index 3e194c9338..e599cecf18 100755 --- a/opac/opac-user.pl +++ b/opac/opac-user.pl @@ -75,7 +75,7 @@ my ( $template, $borrowernumber, $cookie ) = get_template_and_user( } ); -my %renewed = map { $_ => 1 } split( ':', $query->param('renewed') ); +my %renewed = map { $_ => 1 } split( ':', $query->param('renewed') || '' ); my $show_priority; for ( C4::Context->preference("OPACShowHoldQueueDetails") ) { @@ -364,7 +364,7 @@ $template->param( # back to the opac-results page my $search_query = $query->param('has-search-query'); -if ($search_query ne '') { +if ($search_query) { print $query->redirect( -uri => "/cgi-bin/koha/opac-search.pl?$search_query", -- 2.11.0