[Koha-bugs] [Bug 20422] Fix warn on URI/Escape.pm line 184 from opac-detail

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Mar 15 14:47:30 CET 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=20422

Brendan Gallagher <brendan at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #72953|0                           |1
        is obsolete|                            |

--- Comment #4 from Brendan Gallagher <brendan at bywatersolutions.com> ---
Created attachment 72955
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=72955&action=edit
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 at rijksmuseum.nl>

Signed-off-by: Brendan Gallagher <brendan at bywatersolutions.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list