From: DemeritCowboy Date: Tue, 29 Oct 2019 18:43:46 +0000 (-0400) Subject: fix warning when no searchPane mapping for mode X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=48016b17efd7216c9337a1990fe76e4bfc4051fb;p=civicrm-core.git fix warning when no searchPane mapping for mode --- 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; }