Skip to content

Commit

Permalink
Merge pull request #15650 from demeritcowboy/mode-value-missing
Browse files Browse the repository at this point in the history
dev/core#1347 - Fix php warning in advanced search when opening some accordions
  • Loading branch information
eileenmcnaughton authored Oct 30, 2019
2 parents 9427137 + 48016b1 commit 18efe70
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CRM/Contact/Form/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,8 @@ public static function getModeValue($mode = CRM_Contact_BAO_Query::MODE_CONTACTS
}

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;
}

Expand Down

0 comments on commit 18efe70

Please sign in to comment.