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>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Petro Vashchuk 2022-06-20 17:08:32 +03:00 committed by Tomas Cohen Arazi
parent 16ec30258e
commit 407564e394
Signed by: tomascohen
GPG key ID: 0A272EA1B2F3C15F

View file

@ -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);