From e99e3a95505ccd806bd44e11448a317dfb217e1a 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=utf8 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ä 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.39.5