From 8424571d961b450e23934985e657a210e1a9aa1d Mon Sep 17 00:00:00 2001 From: Pradeep Nayak Date: Thu, 17 Jan 2019 01:11:23 +0000 Subject: [PATCH] dev/core/issues/506, Fatal error on advance search when using cases from display results as --- CRM/Contact/Form/Search.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/CRM/Contact/Form/Search.php b/CRM/Contact/Form/Search.php index 996e79f5b8..fc389c6087 100644 --- a/CRM/Contact/Form/Search.php +++ b/CRM/Contact/Form/Search.php @@ -329,13 +329,17 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search { public static function getModeSelect() { self::setModeValues(); + $enabledComponents = CRM_Core_Component::getEnabledComponents(); $componentModes = array(); foreach (self::$_modeValues as $id => & $value) { + if (strpos($value['component'], 'Civi') !== FALSE + && !array_key_exists($value['component'], $enabledComponents) + ) { + continue; + } $componentModes[$id] = $value['selectorLabel']; } - $enabledComponents = CRM_Core_Component::getEnabledComponents(); - // unset disabled components if (!array_key_exists('CiviMail', $enabledComponents)) { unset($componentModes[CRM_Contact_BAO_Query::MODE_MAILING]); -- 2.25.1