[Koha-bugs] [Bug 28880] New: Warning in tr (at Mojo/Headers.pm) because of undef X-Base-Total-Count HTTP header value
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Aug 18 20:24:41 CEST 2021
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28880
Bug ID: 28880
Summary: Warning in tr (at Mojo/Headers.pm) because of undef
X-Base-Total-Count HTTP header value
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: trivial
Priority: P5 - low
Component: REST API
Assignee: koha-bugs at lists.koha-community.org
Reporter: nugged at gmail.com
CC: jonathan.druart+koha at gmail.com, stalkernoid at gmail.com
Depends on: 27353
There was an introduced X-Base-Total-Count header for REST API in Bug 27353.
When used from external plugins and "base_total" not provided (is it
mandatory?) all logs are heavily filled with:
[WARN] Use of uninitialized value $_ in transliteration (tr///)
at /usr/share/perl5/Mojo/Headers.pm line 43.
It's because X-Base-Total-Count comes with "undef" as I debugged,
what solution to choose:
A. should we demand this value from plugin creators?
B. or should we add this (not "0" as default, anyway, right?):
my $base_total = $args->{base_total} // $total;
to Koha/REST/Plugin/Pagination.pm line 63?
Referenced Bugs:
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27353
[Bug 27353] Return the number of total records
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
More information about the Koha-bugs
mailing list