From 828c23920ee5823a4511d333a679cf1ac68fc827 Mon Sep 17 00:00:00 2001 From: eileen Date: Wed, 6 Mar 2019 16:38:03 +1300 Subject: [PATCH] Further on_hold fix - it has been suggested the value might be an array like [''] This would filter that out --- CRM/Contact/BAO/Query.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Contact/BAO/Query.php b/CRM/Contact/BAO/Query.php index ed6e960ee9..c8818f4620 100644 --- a/CRM/Contact/BAO/Query.php +++ b/CRM/Contact/BAO/Query.php @@ -1643,8 +1643,8 @@ class CRM_Contact_BAO_Query { // https://lab.civicrm.org/dev/core/issues/745 // @todo this renaming of email_on_hold to on_hold needs revisiting // it preceeds recent changes but causes the default not to reload. - if (is_numeric($onHoldValue) || is_array($onHoldValue)) { - $onHoldValue = (array) $onHoldValue; + $onHoldValue = array_filter((array) $onHoldValue, 'is_numeric'); + if (!empty($onHoldValue)) { $params[] = ['on_hold', 'IN', $onHoldValue, 0, 0]; } } -- 2.25.1