From 30d92f92481c6ab6871f1b92df9600793ded98a1 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 Signed-off-by: Katrin Fischer Signed-off-by: Jonathan Druart --- C4/Circulation.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 7f37b37af9..401ea2e772 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.39.5