From 5fcdc87dbab09269cf492bab8d4565b4cbbe3f1a 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 87a97b8cca..6d0867253b 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -1338,6 +1338,8 @@ sub IsAvailableForItemLevelRequest { my $patron = shift; my $pickup_branchcode = 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.34.1