Bug 15747: Do not use CGI->param in list context - Auth.pm
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Fri, 12 Feb 2016 11:47:22 +0000 (11:47 +0000)
committerBrendan Gallagher <brendan@bywatersolutions.com>
Wed, 24 Feb 2016 01:47:37 +0000 (01:47 +0000)
Test plan:
Log you in!
Without this patch applied, you will get a warning
"Fetching the value or values of a single named parameter"
With this patch applied, the warning from C4::Auth line 401 should not
appear anymore in the log file.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Note: no warnings for older CGI versions.

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
C4/Auth.pm

index 7655a4f..d891105 100644 (file)
@@ -398,7 +398,7 @@ sub get_template_and_user {
         $template->param( dateformat => C4::Context->preference('dateformat') );
     }
 
-    $template->param(auth_forwarded_hash => $in->{'query'}->param('auth_forwarded_hash'));
+    $template->param(auth_forwarded_hash => scalar $in->{'query'}->param('auth_forwarded_hash'));
 
     # these template parameters are set the same regardless of $in->{'type'}