From 15137f36c0d62eb3ffe9c9ec44ab2590719b7817 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Fri, 17 Dec 2021 12:53:28 -0300 Subject: [PATCH] Bug 29553: (QA follow-up) Check defined instead of evaluating as boolean Signed-off-by: Tomas Cohen Arazi Signed-off-by: Fridolin Somers Signed-off-by: Kyle M Hall (cherry picked from commit a6a6d4af75db5c5be008c13b49727f1b9ee1a53f) Signed-off-by: Andrew Fuerste-Henry --- C4/Reserves.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/C4/Reserves.pm b/C4/Reserves.pm index cd1c62bb35..e7f3b5580b 100644 --- a/C4/Reserves.pm +++ b/C4/Reserves.pm @@ -1342,7 +1342,9 @@ sub IsAvailableForItemLevelRequest { # FIXME - a lot of places in the code do this # or something similar - need to be # consolidated - my $itemtype = $item->effective_itemtype or return 0; + my $itemtype = $item->effective_itemtype; + return 0 + unless defined $itemtype; my $notforloan_per_itemtype = Koha::ItemTypes->find($itemtype)->notforloan; return 0 if -- 2.39.5