From fb75fcb0b18ecae518ac8c50090833910516d764 Mon Sep 17 00:00:00 2001 From: eileen Date: Fri, 15 Feb 2019 16:39:55 +1300 Subject: [PATCH] Remove duplicate setting of variables --- CRM/Contact/BAO/Query.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/CRM/Contact/BAO/Query.php b/CRM/Contact/BAO/Query.php index 0a1ba6f591..add935859d 100644 --- a/CRM/Contact/BAO/Query.php +++ b/CRM/Contact/BAO/Query.php @@ -6544,7 +6544,8 @@ AND displayRelType.is_active = 1 * @return array */ protected function addBasicStatsToSummary(&$summary, $where, $from) { - $summary['total']['count'] = $summary['total']['amount'] = $summary['total']['avg'] = "n/a"; + $summary['total']['count'] = 0; + $summary['total']['amount'] = $summary['total']['avg'] = []; $query = " SELECT COUNT( conts.total_amount ) as total_count, @@ -6562,8 +6563,6 @@ AND displayRelType.is_active = 1 $dao = CRM_Core_DAO::executeQuery($query); - $summary['total']['count'] = 0; - $summary['total']['amount'] = $summary['total']['avg'] = []; while ($dao->fetch()) { $summary['total']['count'] += $dao->total_count; $summary['total']['amount'][] = CRM_Utils_Money::format($dao->total_amount, $dao->currency); -- 2.25.1