From 449dc7eece24b8f7bf39791581e6d90ffa2d92b9 Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Fri, 29 Jan 2021 15:24:20 +0000 Subject: [PATCH] Bug 18146: (follow-up) Remove warn for uninitialized value In the previous patch you may have noticed many warns when running the tests We add guarantor charges to a variable to determine if over the limit, but we don't initialize that value We should To test: 1 - Apply first patch and follow test plan 2 - Note warns when proving test 3 - Apply this patch 4 - prove 5 - No more warns Signed-off-by: David Nind --- C4/Circulation.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 1f13cef93d..d2304b0889 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -840,7 +840,7 @@ sub CanBookBeIssued { $no_issues_charge_guarantees = undef unless looks_like_number( $no_issues_charge_guarantees ); if ( defined $no_issues_charge_guarantees ) { my @guarantees = map { $_->guarantee } $patron->guarantee_relationships(); - my $guarantees_non_issues_charges; + my $guarantees_non_issues_charges = 0; foreach my $g ( @guarantees ) { $guarantees_non_issues_charges += $g->account->non_issues_charges; } -- 2.11.0