From 6d63b9d2e82d0cb0bb390ff791ea22587194c775 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 18 Sep 2023 11:41:36 +0200 Subject: [PATCH] Bug 33949: Fix display of old checkouts if no checkouts exist If we pass an empty array from the perl controller, we retrieve an empty string from the template, and the merge does not work. This patch fixes the following bug: Pick a patron without checkout history Check them an item out and check it in => The table is empty, whereas it should display the item that has been checked in. --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt index 03de9569fc1..570e1928b71 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-readingrecord.tt @@ -47,6 +47,8 @@

Checkout history

+ [% UNLESS checkouts %][% checkouts = [] %][% END %] + [% UNLESS old_checkouts %][% old_checkouts = [] %][% END %] [% SET all_checkouts = checkouts.merge(old_checkouts) %] [% IF all_checkouts.size == 0 %] You have never borrowed anything from this library. -- 2.25.1