From 1e255e93eb4e3532ad69d1291c9c0b96b21ee8d9 Mon Sep 17 00:00:00 2001 From: Colin Campbell Date: Thu, 23 Jun 2011 12:10:51 +0100 Subject: [PATCH] Bug 5549 Fix a couple of comparisons in C4::Circulation Changed a string comparison called on an integer Deal with case where value is not set without runtime warnings --- C4/Circulation.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 41d60dd6f0..bbff8ae862 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -793,7 +793,7 @@ sub CanBookBeIssued { # my ($current_loan_count, $max_loans_allowed) = TooMany( $borrower, $item->{biblionumber}, $item ); # if TooMany max_loans_allowed returns 0 the user doesn't have permission to check out this book - if ($max_loans_allowed eq 0) { + if (defined $max_loans_allowed && $max_loans_allowed == 0) { $needsconfirmation{PATRON_CANT} = 1; } else { if($max_loans_allowed){ -- 2.39.5