X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FPseudoConstant.php;h=843fd7099e18df563f477cc70ad3591bf2da1e83;hb=63d7640448cd41cda34b2851ffa5408e01748fa0;hp=773194a1aea18b813263dde562589ad314870bc2;hpb=6a1f8c666abdefc317acf8ef6ad60f34e1acb561;p=civicrm-core.git diff --git a/CRM/Core/PseudoConstant.php b/CRM/Core/PseudoConstant.php index 773194a1ae..843fd7099e 100644 --- a/CRM/Core/PseudoConstant.php +++ b/CRM/Core/PseudoConstant.php @@ -185,7 +185,7 @@ class CRM_Core_PseudoConstant { // 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, @@ -824,7 +824,7 @@ WHERE id = %1"; $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; } } @@ -1393,7 +1393,7 @@ WHERE id = %1 $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; }