Bug 16476: Do not call CGI->param in list context, some more
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 9 May 2016 14:03:12 +0000 (15:03 +0100)
committerChris Cormack <chrisc@catalyst.net.nz>
Wed, 3 Aug 2016 20:19:20 +0000 (08:19 +1200)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Koha/Plugins/Base.pm
opac/ilsdi.pl
svc/members/search
svc/virtualshelves/search

index 55e1e7b..4aa8e94 100644 (file)
@@ -117,7 +117,7 @@ sub get_template {
 
     $template->param(
         CLASS       => $self->{'class'},
-        METHOD      => $self->{'cgi'}->param('method'),
+        METHOD      => scalar $self->{'cgi'}->param('method'),
         PLUGIN_PATH => $self->get_plugin_http_path(),
     );
 
index 05e7c5c..9c0fcad 100755 (executable)
@@ -128,7 +128,7 @@ unless ( $cgi->param('service') ) {
 }
 
 # If user requested a service description, then display it
-if ( $cgi->param('service') eq "Describe" and any { $cgi->param('verb') eq $_ } @services ) {
+if ( scalar $cgi->param('service') eq "Describe" and any { scalar $cgi->param('verb') eq $_ } @services ) {
     my ( $template, $loggedinuser, $cookie ) = get_template_and_user(
         {   template_name   => "ilsdi.tt",
             query           => $cgi,
@@ -137,7 +137,7 @@ if ( $cgi->param('service') eq "Describe" and any { $cgi->param('verb') eq $_ }
             debug           => 1,
         }
     );
-    $template->param( $cgi->param('verb') => 1 );
+    $template->param( scalar $cgi->param('verb') => 1 );
     output_html_with_http_headers $cgi, $cookie, $template->output;
     exit 0;
 }
index 1c2d644..2599519 100755 (executable)
@@ -31,7 +31,7 @@ my $input = new CGI;
 exit unless $input->param('template_path');
 
 my ($template, $user, $cookie) = get_template_and_user({
-    template_name   => $input->param('template_path'),
+    template_name   => scalar $input->param('template_path'),
     query           => $input,
     type            => "intranet",
     authnotrequired => 0,
index 5e991fc..0c827c0 100755 (executable)
@@ -13,7 +13,7 @@ my $input = new CGI;
 exit unless $input->param('template_path');
 
 my ($template, $user, $cookie) = get_template_and_user({
-    template_name   => $input->param('template_path'),
+    template_name   => scalar $input->param('template_path'),
     query           => $input,
     type            => "intranet",
     authnotrequired => 0,