From 6f42b65266af4307f457fb4893140cd8c35612ae Mon Sep 17 00:00:00 2001 From: Shi Yao Wang Date: Fri, 29 Apr 2022 16:01:26 -0400 Subject: [PATCH] Bug 30556: Fix IsAvailableForItemLevelRequest to return early Signed-off-by: David Nind Signed-off-by: David Nind --- C4/Reserves.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/C4/Reserves.pm b/C4/Reserves.pm index b504cfc913..bfd6b14cff 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -1364,6 +1364,8 @@ sub IsAvailableForItemLevelRequest { # looped outside of IsAvailableForItemLevelRequest to avoid nested loops: my $items_any_available = shift; + return 0 unless $patron; + my $dbh = C4::Context->dbh; # must check the notforloan setting of the itemtype # FIXME - a lot of places in the code do this -- 2.25.1