From 61d5e68b5afd01601e03329141404edbc3b6bcaf Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Sat, 19 May 2018 14:15:27 +1000 Subject: [PATCH] dev/core#117 Replace deprecated each with foreach in CRM/Activity/BAO/Query.php --- CRM/Activity/BAO/Query.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CRM/Activity/BAO/Query.php b/CRM/Activity/BAO/Query.php index 79e36aec00..724a30642a 100644 --- a/CRM/Activity/BAO/Query.php +++ b/CRM/Activity/BAO/Query.php @@ -318,8 +318,8 @@ class CRM_Activity_BAO_Query { case 'activity_result': if (is_array($value)) { - $safe = NULL; - while (list(, $k) = each($value)) { + $safe = []; + foreach ($values as $id => $k) { $safe[] = "'" . CRM_Utils_Type::escape($k, 'String') . "'"; } $query->_where[$grouping][] = "civicrm_activity.result IN (" . implode(',', $safe) . ")"; @@ -505,7 +505,7 @@ class CRM_Activity_BAO_Query { if ($name) { $value = CRM_Core_OptionGroup::values($name); if (!empty($value)) { - while (list($k, $v) = each($value)) { + foreach ($value as $k => $v) { $resultOptions[$v] = $v; } } -- 2.25.1