From d44732bacd87fb304990b91d06786eda82b46cba Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 27 Jun 2016 12:24:15 -0300 Subject: [PATCH] Bug 15023: (followup) Remove warnings By setting 'use Modern::Perl' some previously hidden warnings arised. This patch removes them by testing the variable $balance for undef before using it in a comparisson. Sponsored-by: VOKAL Signed-off-by: Liz Rea Signed-off-by: Katrin Fischer Signed-off-by: Kyle M Hall --- tools/cleanborrowers.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/cleanborrowers.pl b/tools/cleanborrowers.pl index df2196f4cd..4cc916910a 100755 --- a/tools/cleanborrowers.pl +++ b/tools/cleanborrowers.pl @@ -188,7 +188,7 @@ sub _skip_borrowers_with_nonzero_balance { my $balance; @$borrowers = map { (undef, undef, $balance) = GetMemberIssuesAndFines( $_->{borrowernumber} ); - ($balance != 0) ? (): ($_); + (defined $balance && $balance != 0) ? (): ($_); } @$borrowers; } -- 2.39.5