From 7ce1e8f3616e192f9d83c04bc827ff1e74654889 Mon Sep 17 00:00:00 2001 From: "B. Endres" Date: Thu, 1 Apr 2021 13:57:50 +0200 Subject: [PATCH] proposed fix/workaround for CORE-2502 --- CRM/Contact/BAO/Query.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CRM/Contact/BAO/Query.php b/CRM/Contact/BAO/Query.php index b53ebface1..f581fe2558 100644 --- a/CRM/Contact/BAO/Query.php +++ b/CRM/Contact/BAO/Query.php @@ -3293,7 +3293,8 @@ WHERE $smartGroupClause $tagTree = CRM_Core_BAO_Tag::getChildTags(); foreach ((array) $value as $tagID) { if (!empty($tagTree[$tagID])) { - $value = array_unique(array_merge($value, $tagTree[$tagID])); + // make sure value is an array here (see CORE-2502) + $value = array_unique(array_merge((array) $value, $tagTree[$tagID])); } } -- 2.25.1