From 5840d25353dbf872cd908064a79550ba2a2826fe Mon Sep 17 00:00:00 2001 From: Aidan Saunders Date: Wed, 28 Feb 2018 12:22:42 +0000 Subject: [PATCH] Avoid unnecessary foreach by reference --- CRM/Contact/BAO/Query.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/CRM/Contact/BAO/Query.php b/CRM/Contact/BAO/Query.php index bba79e2632..bea617c11f 100644 --- a/CRM/Contact/BAO/Query.php +++ b/CRM/Contact/BAO/Query.php @@ -1595,11 +1595,7 @@ class CRM_Contact_BAO_Query { } } - 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; - + foreach ($formValues as $id => $values) { if (self::isAlreadyProcessedForQueryFormat($values)) { $params[] = $values; continue; -- 2.25.1