]> git.koha-community.org Git - koha.git/commit
Bug 20422: Fix warning on uri_escape_utf8 in Output.pm
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Thu, 15 Mar 2018 11:37:11 +0000 (12:37 +0100)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 26 Mar 2018 20:31:13 +0000 (17:31 -0300)
commit5c3ead6ecd0641306c65a321d642a392a24dca63
tree8f84039e3f967ce1e7322148eb413c9e5107a854
parentd3503e8119fd453241cb6d3824eeda0af0e5ec5e
Bug 20422: Fix warning on uri_escape_utf8 in Output.pm

When opac-details calls parametrized_url, it triggers an uninitialized
warning when you would have a record without e.g. author, like:
    Use of uninitialized value in subroutine entry at /usr/share/perl5/URI/Escape.pm line 184.

This is (imo) actually a bug in URI::Escape; it should check its args.
But we resolve the warning here by adding the "// q{}" in parametrized_url.

NOTE: Along the way we do something similar in the arrParamsBusc loop.
If the variable is undefined, jump to the next one. (Consistent with the
approach in the if-part preceding it.)

Test plan:
[1] Run t/Output.t again. Should pass now.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
C4/Output.pm
opac/opac-detail.pl