Bugzilla – Attachment 136386 Details for
Bug 30997
"CGI::param called in list context" warning in detail.pl flooding error log
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30997: Fix "CGI::param called in list context" warning in detail.pl
Bug-30997-Fix-CGIparam-called-in-list-context-warn.patch (text/plain), 1.51 KB, created by
Jonathan Druart
on 2022-06-21 07:15:26 UTC
(
hide
)
Description:
Bug 30997: Fix "CGI::param called in list context" warning in detail.pl
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-06-21 07:15:26 UTC
Size:
1.51 KB
patch
obsolete
>From ea347209e129a6c82b2b82de4e329cbabdeae753 Mon Sep 17 00:00:00 2001 >From: Petro Vashchuk <stalkernoid@gmail.com> >Date: Mon, 20 Jun 2022 17:08:32 +0300 >Subject: [PATCH] Bug 30997: Fix "CGI::param called in list context" warning in > detail.pl > >CGI param found1 should be explicitly scalar, >or else error log gets flooded with this warning: > >CGI::param called in list context from >/usr/share/koha/intranet/cgi-bin/catalogue/detail.pl line 622 > >This patch fixes it by working with it in a scalar context. >The functionality still remains the same but warning doesn't flood >error log. > >To reproduce: >1. Open any biblio (details.pl) page. >2. Check the error log and find the upper mentioned warning, >check the timestamp to ensure that it was added when you loaded the page. >3. Apply the patch. >4. Load the page again, ensure that the same warning doesn't get added >to the log file again. > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > catalogue/detail.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/catalogue/detail.pl b/catalogue/detail.pl >index e4d84aa0eac..3bf62550373 100755 >--- a/catalogue/detail.pl >+++ b/catalogue/detail.pl >@@ -619,7 +619,7 @@ if ( C4::Context->preference('UseCourseReserves') ) { > $template->param( course_reserves => $course_reserves ); > } > >-$template->param(found1 => $query->param('found1') ); >+$template->param(found1 => scalar $query->param('found1') ); > > $template->param(biblio => $biblio); > >-- >2.25.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30997
:
136374
|
136377
| 136386