From 70f708388491736a01114cecfdf71ce5bc24e0a7 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 27 Jun 2016 12:24:15 -0300 Subject: [PATCH] [PASSED QA] 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 --- tools/cleanborrowers.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/cleanborrowers.pl b/tools/cleanborrowers.pl index df2196f..4cc9169 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; } -- 1.9.1