From 7d5b521cbf1ab7450b2d327eeca884c59fb1d605 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Sun, 28 Apr 2019 20:55:02 -0400 Subject: [PATCH] Bug 21027; Fix checkout statistics if 1+ of the fields is not defined --- members/statistics.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/members/statistics.pl b/members/statistics.pl index 61c42f9c34..ba453453c6 100755 --- a/members/statistics.pl +++ b/members/statistics.pl @@ -198,7 +198,10 @@ sub merge { for my $ch ( @r ) { $exists = 1; for my $cn ( @statistic_column_names ) { - if ( $ch->{$cn} and not $ch->{$cn} eq $h->{$cn} ) { + if ( ( not defined $ch->{$cn} && defined $h->{$cn} ) + || ( defined $ch->{$cn} && not defined $h->{$cn} ) + || ( $ch->{$cn} ne $h->{$cn} ) ) + { $exists = 0; last; } -- 2.11.0