From e492c7aeffc236cd159c3337af6747416038235c Mon Sep 17 00:00:00 2001 From: Jon Goldberg Date: Thu, 2 Apr 2020 14:07:33 -0400 Subject: [PATCH] core#1688 - false positive on missing custom field check --- CRM/Utils/Check/Component/Schema.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Utils/Check/Component/Schema.php b/CRM/Utils/Check/Component/Schema.php index 13803b63c8b4..fb4d25364899 100644 --- a/CRM/Utils/Check/Component/Schema.php +++ b/CRM/Utils/Check/Component/Schema.php @@ -121,8 +121,8 @@ public function checkSmartGroupCustomFieldCriteria() { } foreach ($group['form_values'] as $formValues) { if (isset($formValues[0]) && (strpos($formValues[0], 'custom_') === 0)) { - list(, $customFieldID) = explode('custom_', $formValues[0]); - if (!in_array($customFieldID, $customFieldIds, TRUE)) { + list(, $customFieldID) = explode('_', $formValues[0]); + if (!in_array((int) $customFieldID, $customFieldIds, TRUE)) { $problematicSG[CRM_Contact_BAO_SavedSearch::getName($group['id'], 'id')] = [ 'title' => CRM_Contact_BAO_SavedSearch::getName($group['id'], 'title'), 'cfid' => $customFieldID,