Bug 30997: Fix "CGI::param called in list context" warning in detail.pl
authorPetro Vashchuk <stalkernoid@gmail.com>
Mon, 20 Jun 2022 14:08:32 +0000 (17:08 +0300)
committerArthur Suzuki <arthur.suzuki@biblibre.com>
Thu, 21 Jul 2022 14:31:19 +0000 (16:31 +0200)
commit8556fab82add7c66273f66dc88824cfa2e27fcef
treea3df6f7ddf780c4af452c32caed156daf3d43918
parent96a6472747ae77e5415fddb9824b003ce3998494
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>
(cherry picked from commit 407564e3940ad08030383078fd1ce5c530a19f2d)

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 535f555468709316aaea99e3b71481c3b2a6a800)
Signed-off-by: Arthur Suzuki <arthur.suzuki@biblibre.com>
catalogue/detail.pl