From f33446b4d0ba2c91932522f374a1da19c1315be3 Mon Sep 17 00:00:00 2001 From: Colin Campbell Date: Thu, 23 Jun 2011 12:10:51 +0100 Subject: [PATCH] Bug 7751 : 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 This is dependent on bug 5549 Signed-off-by: Martin Renvoize Signed-off-by: Chris Cormack --- C4/Circulation.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 6016712..f5918b3 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -943,11 +943,12 @@ sub CanBookBeIssued { } ## check for high holds decreasing loan period - if (C4::Context->preference("decreaseLoanHighHolds") == 1) + my $decrease_loan = C4::Context->preference('decreaseLoanHighHolds'); + if ($decrease_loan && $decrease_loan == 1) { my ($reserved,$num,$duration,$returndate)=checkHighHolds($item,$borrower); #print "reserved: $reserved\n".Dumper($num); - if ($num>=C4::Context->preference("decreaseLoanHighHoldsValue")) + if ($num >= C4::Context->preference("decreaseLoanHighHoldsValue")) { $needsconfirmation{HIGHHOLDS} = { num_holds => $num, -- 1.7.10.4