From e928e0e778075bbd768288abdb4fca0e455f2a60 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 7 Sep 2022 08:49:14 -0700 Subject: [PATCH] Bug 31396: Fix incorrect attribute access in opac-detail.pl To test: 1. Have an item with a callnumber defined 2. Have OPACShelfBrowser enabled 3. Open the record detailed view in the OPAC 4. Click on 'Browse shelf' => FAIL: It explodes 5. Apply this patch 6. Repeat 4 => SUCCESS: It works! 7. Sign off :-D Signed-off-by: Tomas Cohen Arazi --- opac/opac-detail.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opac/opac-detail.pl b/opac/opac-detail.pl index a7289f3d0a..02acf84e1f 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -1096,7 +1096,7 @@ if (C4::Context->preference("OPACShelfBrowser")) { ); # in which tab shelf browser should open ? - if (grep { $starting_itemnumber == $_->itemnumber } @itemloop) { + if (grep { $starting_itemnumber == $_->{itemnumber} } @itemloop) { $template->param(shelfbrowser_tab => 'holdings'); } else { $template->param(shelfbrowser_tab => 'otherholdings'); -- 2.37.3