From fe1446f1a4e622fc759056ca637087237d84a8b8 Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Sat, 30 Mar 2019 19:14:36 +0000 Subject: [PATCH] dev/core/issues/837, Fixed notice error on Contribution Agrreagate custom search. --- .../Form/Search/Custom/ContributionAggregate.php | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/CRM/Contact/Form/Search/Custom/ContributionAggregate.php b/CRM/Contact/Form/Search/Custom/ContributionAggregate.php index 2692dad23f..65b1c859dc 100644 --- a/CRM/Contact/Form/Search/Custom/ContributionAggregate.php +++ b/CRM/Contact/Form/Search/Custom/ContributionAggregate.php @@ -200,11 +200,17 @@ civicrm_contact AS contact_a {$this->_aclFrom} "contrib.is_test = 0", ); - $dateParams = array( - 'contribution_date_relative' => $this->_formValues['contribution_date_relative'], - 'contribution_date_low' => $this->_formValues['contribution_date_low'], - 'contribution_date_high' => $this->_formValues['contribution_date_high'], - ); + foreach ([ + 'contribution_date_relative', + 'contribution_date_low', + 'contribution_date_high', + ] as $dateFieldName) { + $dateParams[$dateFieldName] = CRM_Utils_Array::value( + $dateFieldName, + $this->_formValues + ); + } + foreach (CRM_Contact_BAO_Query::convertFormValues($dateParams) as $values) { list($name, $op, $value) = $values; if (strstr($name, '_low')) { -- 2.25.1