Koha-clms/serials
Jonathan Druart b965dd5d49
Bug 40861: Remove warning from serials/acqui-search-result.pl
Odd number of elements in anonymous hash at /kohadevbox/koha/serials/acqui-search-result.pl line 84.

it's coming from closedate that is empty, and output_pref that will
reach this return:
278     if ($str) {
279         local $@;
280         $dt = eval { dt_from_string($str) };
281         Koha::Exceptions::WrongParameter->throw("Invalid date '$str' passed to output_pref") if $@;
282     }
283
284     return if !defined $dt;    # NULL date

if str is undef, we don't enter if l.278 and return l.284
which will shift the elements of the hash (because of the list context)

We force the scalar and we are good.

There was no side-effect because closedate was the last of the list.

Note that total (and the 'count(*)' key) is not used in the template.

Test plan:
Create an order for a basket of the first vendor "My vendor" and hit
http://localhost:8081/cgi-bin/koha/serials/acqui-search-result.pl?supplier=d
Without this patch you get the warning
Odd number of elements in anonymous hash at /kohadevbox/koha/serials/acqui-search-result.pl line 84.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 71619f90e5)
Signed-off-by: Paul Derscheid <paul.derscheid@lmscloud.de>
(cherry picked from commit 6ebf2b7e45)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
2025-10-16 12:16:45 +02:00
..
acqui-search-result.pl Bug 40861: Remove warning from serials/acqui-search-result.pl 2025-10-16 12:16:45 +02:00
acqui-search.pl
…
checkexpiration.pl Bug 29609: Centralized code to build the link to a biblio detail page 2022-04-08 15:49:16 +02:00
claims.pl Bug 35044: Update: Serial subscriptions 2024-08-23 18:21:23 +02:00
create-numberpattern.pl Bug 28785: Adjust check_cookie_auth calls 2021-10-18 11:28:41 +02:00
lateissues-export.pl Bug 33339: Prevent Formula Injection (CSV Injection) in CSV files 2024-11-14 10:46:31 +01:00
reorder_members.pl
…
routing-preview.pl Bug 31335: Remove unnecessary holds fetch from routing-preview 2024-04-26 18:06:20 +02:00
routing.pl Bug 35329: Handle duplicate without 500 2024-03-01 11:01:26 +01:00
serials-collection.pl Bug 34971: Fix permission to close a serial subscription (edit) 2025-08-06 10:16:37 +00:00
serials-edit.pl Bug 32392: Enable skipping forward issues when receiving serials. 2024-04-29 15:19:30 +02:00
serials-home.pl
…
serials-search.pl Bug 26567: Allow to limit subscription search to subscriptions with routing lists 2024-05-10 16:45:44 +02:00
showpredictionpattern.pl Bug 35646: Allow use of publication date fields in serial numbering pattern 2024-04-29 09:35:44 +02:00
subscription-add.pl Bug 35044: (QA follow-up): DRY code before set_additional_fields 2024-08-23 18:21:26 +02:00
subscription-batchedit.pl Bug 35044: (QA follow-up): Allow for '0' in serials batch edit 2024-08-23 18:21:27 +02:00
subscription-bib-search.pl Bug 34478: Corrections to some serials scripts 2024-03-01 11:00:10 +01:00
subscription-detail.pl Bug 34971: (QA follow-up) Op is now cud-reopen 2025-08-06 10:16:37 +00:00
subscription-frequencies.pl Bug 29818: Cannot save subscription frequency without display order 2024-11-18 17:44:35 +01:00
subscription-frequency.pl Bug 28785: Adjust check_cookie_auth calls 2021-10-18 11:28:41 +02:00
subscription-history.pl Bug 34478: op =~ ^cud- in pl/pm 2024-03-01 10:56:11 +01:00
subscription-numberpattern.pl Bug 28785: Adjust check_cookie_auth calls 2021-10-18 11:28:41 +02:00
subscription-numberpatterns.pl Bug 34478: Update numbering patterns modification and deletion 2024-03-01 10:59:41 +01:00
subscription-renew.pl Bug 34478: Adjust 'op' on serials/subscription-renew 2024-03-01 11:00:16 +01:00
viewalerts.pl
…