From 5dcd47755f4ded4fb66b4cb82e1030760b81a59f Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Fri, 1 Sep 2023 16:12:56 +0000 Subject: [PATCH] Bug 34694: Only check for IsAvailableForItemLevelRequest if is authenticated - Go to circulation rules and set On shelf holds allowed to If all unavailable - Log out - Visit a bib record on OPAC: http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=76 - Notice it blows up with error 500 - Apply patch. Repeat Signed-off-by: Owen Leonard Signed-off-by: Tomas Cohen Arazi (cherry picked from commit 1742913a0522c589705c5e54ce13c6ef1c7463ea) Signed-off-by: Fridolin Somers (cherry picked from commit 6054c26215e2733d95208b718da916d6962533e4) Signed-off-by: Matt Blenkinsop --- 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 b62de56458..5f5ce3013a 100755 --- a/opac/opac-detail.pl +++ b/opac/opac-detail.pl @@ -682,7 +682,7 @@ else { $item_info->{holding_library_info} = $opac_info_holding->content if $opac_info_holding; $item_info->{home_library_info} = $opac_info_home->content if $opac_info_home; - $can_item_be_reserved = $can_item_be_reserved || IsAvailableForItemLevelRequest($item, $patron, undef); + $can_item_be_reserved = $can_item_be_reserved || $patron && IsAvailableForItemLevelRequest($item, $patron, undef); # get collection code description, too my $ccode = $item->ccode; -- 2.39.5