From 08de68237022253e6c38cc968772d70afe4ff152 Mon Sep 17 00:00:00 2001 From: jitendrapurohit Date: Thu, 14 Jul 2016 11:25:03 +0530 Subject: [PATCH] CRM-19080 - fix enotice in advance search --- CRM/Contact/Form/Search/Advanced.php | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/CRM/Contact/Form/Search/Advanced.php b/CRM/Contact/Form/Search/Advanced.php index 9eff8f8b99..8d9f4b4392 100644 --- a/CRM/Contact/Form/Search/Advanced.php +++ b/CRM/Contact/Form/Search/Advanced.php @@ -394,15 +394,17 @@ class CRM_Contact_Form_Search_Advanced extends CRM_Contact_Form_Search { */ if (isset($defaults['contact_tags'])) { foreach ($defaults['contact_tags'] as $key => $tagId) { - $parentId = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_Tag', $tagId, 'parent_id'); - $element = "contact_taglist[$parentId]"; - if ($this->elementExists($element)) { - // This tag is a tagset - unset($defaults['contact_tags'][$key]); - if (!isset($defaults[$element])) { - $defaults[$element] = array(); + if (!is_array($tagId)) { + $parentId = CRM_Core_DAO::getFieldValue('CRM_Core_DAO_Tag', $tagId, 'parent_id'); + $element = "contact_taglist[$parentId]"; + if ($this->elementExists($element)) { + // This tag is a tagset + unset($defaults['contact_tags'][$key]); + if (!isset($defaults[$element])) { + $defaults[$element] = array(); + } + $defaults[$element][] = $tagId; } - $defaults[$element][] = $tagId; } } if (empty($defaults['contact_tags'])) { -- 2.25.1