From 60e08d51bb814eb1dae834afa0c259539eaf2c61 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 14 Jan 2021 10:42:53 +0100 Subject: [PATCH] Bug 15448: Fix ISE The method Koha::Items->itemnumber is not covered by tests! Trace begun at /kohadevbox/koha/Koha/Objects.pm line 592 Koha::Objects::AUTOLOAD('Koha::Items=HASH(0x55981fd94790)') called at /kohadevbox/koha/opac/opac-reserve.pl line 465 Signed-off-by: Jonathan Druart (cherry picked from commit 9790b5ca3a1b8a92d56a14207d6245c02dfe7fd6) Signed-off-by: Fridolin Somers --- opac/opac-reserve.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opac/opac-reserve.pl b/opac/opac-reserve.pl index eb8c2660a8..d6e6745c6b 100755 --- a/opac/opac-reserve.pl +++ b/opac/opac-reserve.pl @@ -462,7 +462,7 @@ foreach my $biblioNum (@biblionumbers) { my @notforloan_avs = Koha::AuthorisedValues->search_by_koha_field({ kohafield => 'items.notforloan', frameworkcode => $frameworkcode }); my $notforloan_label_of = { map { $_->authorised_value => $_->opac_description } @notforloan_avs }; - my $visible_items = { map { $_->itemnumber => 1 } $biblio->items->filter_by_visible_in_opac( { patron => $patron } ) }; + my $visible_items = { map { $_->itemnumber => 1 } $biblio->items->filter_by_visible_in_opac( { patron => $patron } )->as_list }; # Only keep the items that are visible in the opac (i.e. those in %visible_items) # FIXME: We should get rid of itemInfos altogether and use $visible_items -- 2.39.5