From 4307f145400c5122295ddb621602223a6ed3e504 Mon Sep 17 00:00:00 2001 From: jitendrapurohit Date: Mon, 19 Sep 2016 18:36:11 +0530 Subject: [PATCH] CRM-19374 - Advanced Search fails on Contribution Receive date filter --- CRM/Contact/BAO/Query.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CRM/Contact/BAO/Query.php b/CRM/Contact/BAO/Query.php index 62bf3381c4..9d0b97d440 100644 --- a/CRM/Contact/BAO/Query.php +++ b/CRM/Contact/BAO/Query.php @@ -1538,7 +1538,10 @@ class CRM_Contact_BAO_Query { self::filterCountryFromValuesIfStateExists($formValues); - foreach ($formValues as $id => $values) { + foreach ($formValues as $id => &$val) { + // CRM-19374 - we don't want to change $val in $formValues. + // Assign it to a temp variable which operates while iteration. + $values = $val; if (self::isAlreadyProcessedForQueryFormat($values)) { $params[] = $values; -- 2.25.1