From d968e78c605a6d003226b817993db8f87d97cbbf Mon Sep 17 00:00:00 2001 From: Andrew West Date: Sat, 2 May 2020 13:29:25 +0100 Subject: [PATCH] Fix undefined index error By checking if contact_type is empty --- CRM/Contact/Form/Search/Advanced.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Contact/Form/Search/Advanced.php b/CRM/Contact/Form/Search/Advanced.php index c6a76196bd..4edd6f1c4e 100644 --- a/CRM/Contact/Form/Search/Advanced.php +++ b/CRM/Contact/Form/Search/Advanced.php @@ -192,7 +192,7 @@ class CRM_Contact_Form_Search_Advanced extends CRM_Contact_Form_Search { $this->normalizeDefaultValues($defaults); //991/Subtypes not respected when editing smart group criteria - if ($defaults['contact_type'] && !empty($this->_formValues['contact_sub_type'])) { + if (!empty($defaults['contact_type']) && !empty($this->_formValues['contact_sub_type'])) { foreach ($this->_formValues['contact_sub_type'] as $subtype) { $basicType = CRM_Contact_BAO_ContactType::getBasicType($subtype); $defaults['contact_type'][$subtype] = $basicType . '__' . $subtype; -- 2.25.1