// Historically this was 'false' but according to the notes in
// CRM_Core_DAO::buildOptionsContext it should be context dependent.
// timidly changing for 'search' only to fix world_region in search options.
- $localizeDefault = in_array($context, ['search']) ? TRUE : FALSE;
+ $localizeDefault = in_array($context, ['search']);
// Merge params with defaults
$params += [
'grouping' => FALSE,
'localize' => $localizeDefault,
- 'onlyActive' => ($context == 'validate' || $context == 'get') ? FALSE : TRUE,
+ 'onlyActive' => !($context == 'validate' || $context == 'get'),
'fresh' => FALSE,
'context' => $context,
];
$countryIsoCodes = self::countryIsoCode();
$defaultID = array_search(CRM_Core_BAO_Country::defaultContactCountry(), $countryIsoCodes);
if ($defaultID !== FALSE) {
- $default[$defaultID] = CRM_Utils_Array::value($defaultID, self::$country);
+ $default[$defaultID] = self::$country[$defaultID] ?? NULL;
self::$country = $default + self::$country;
}
}
$index = $filter['greeting_type'] . '_' . $columnName;
// also add contactType to the array
- $contactType = CRM_Utils_Array::value('contact_type', $filter);
+ $contactType = $filter['contact_type'] ?? NULL;
if ($contactType) {
$index .= '_' . $contactType;
}