From 2c21b36684c920ba018116684e11b3ac59729e37 Mon Sep 17 00:00:00 2001 From: Jitendra Purohit Date: Thu, 19 Apr 2018 17:51:42 +0530 Subject: [PATCH] core/issues/64 - In custom searches, column headings are being ignored --- CRM/Contact/StateMachine/Search.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/CRM/Contact/StateMachine/Search.php b/CRM/Contact/StateMachine/Search.php index ce90bb0d82..76df5c3598 100644 --- a/CRM/Contact/StateMachine/Search.php +++ b/CRM/Contact/StateMachine/Search.php @@ -103,10 +103,13 @@ class CRM_Contact_StateMachine_Search extends CRM_Core_StateMachine { } $this->_controller->set('task', $value); - $componentMode = $this->_controller->get('component_mode'); - $modeValue = CRM_Contact_Form_Search::getModeValue($componentMode); - $taskClassName = $modeValue['taskClassName']; - return $taskClassName::getTask($value); + if ($value) { + $componentMode = $this->_controller->get('component_mode'); + $modeValue = CRM_Contact_Form_Search::getModeValue($componentMode); + $taskClassName = $modeValue['taskClassName']; + return $taskClassName::getTask($value); + } + return CRM_Contact_Task::getTask($value); } /** -- 2.25.1