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 <liz@catalyst.net.nz>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
Tomas Cohen Arazi 2016-06-27 12:24:15 -03:00 committed by Kyle M Hall
parent 38c461f258
commit d44732bacd
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}