From 48016b17efd7216c9337a1990fe76e4bfc4051fb Mon Sep 17 00:00:00 2001 From: DemeritCowboy Date: Tue, 29 Oct 2019 14:43:46 -0400 Subject: [PATCH] fix warning when no searchPane mapping for mode --- CRM/Contact/Form/Search.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CRM/Contact/Form/Search.php b/CRM/Contact/Form/Search.php index 4db0e2ea0e..a225db1225 100644 --- a/CRM/Contact/Form/Search.php +++ b/CRM/Contact/Form/Search.php @@ -302,7 +302,8 @@ class CRM_Contact_Form_Search extends CRM_Core_Form_Search { } self::setModeValues(); - if (!array_key_exists($mode, self::$_modeValues)) { + // Note $mode might === FALSE because array_search above failed, e.g. for searchPane='location' + if (empty(self::$_modeValues[$mode])) { $mode = CRM_Contact_BAO_Query::MODE_CONTACTS; } -- 2.25.1