From 4c94ae6e19ebd1bf035374ca71d61db98e4eed73 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 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Joonas Kylmälä --- 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.30.2