$standardTimeline = $params['standardTimeline'] ?? NULL;
$activitySetName = $params['activitySetName'] ?? NULL;
- if ('Open Case' == CRM_Utils_Array::value('activityTypeName', $params)) {
+ if ('Open Case' == ($params['activityTypeName'] ?? '')) {
// create relationships for the ones that are required
foreach ($xml->CaseRoles as $caseRoleXML) {
foreach ($caseRoleXML->RelationshipType as $relationshipTypeXML) {
}
}
- if ('Change Case Start Date' == CRM_Utils_Array::value('activityTypeName', $params)) {
+ if ('Change Case Start Date' == ($params['activityTypeName'] ?? '')) {
// delete all existing activities which are non-empty
$this->deleteEmptyActivity($params);
}
* @param array $params
*/
public function processStandardTimeline($activitySetXML, &$params) {
- if ('Change Case Type' == CRM_Utils_Array::value('activityTypeName', $params)
+ if ('Change Case Type' == ($params['activityTypeName'] ?? '')
&& CRM_Utils_Array::value('resetTimeline', $params, TRUE)
) {
// delete all existing activities which are non-empty
if (!empty($index) && (
// it's empty so we set it OR
- !CRM_Utils_Array::value($prefixName, $profileAddressFields)
+ empty($profileAddressFields[$prefixName])
//we are dealing with billing id (precedence)
|| $index == $billing_id
// we are dealing with primary & billing not set
// FIXME: Shouldn't the X-Forwarded-Proto check be part of CRM_Utils_System::isSSL()?
if (Civi::settings()->get('enableSSL') &&
!CRM_Utils_System::isSSL() &&
- strtolower(CRM_Utils_Array::value('X_FORWARDED_PROTO', CRM_Utils_System::getRequestHeaders())) != 'https'
+ strtolower(CRM_Utils_System::getRequestHeaders()['X_FORWARDED_PROTO'] ?? '') != 'https'
) {
return civicrm_api3_create_error('System policy requires HTTPS.');
}
}
}
- if (($params['upload_type'] || file_exists(CRM_Utils_Array::value('tmp_name', $files['textFile']))) ||
+ if (($params['upload_type'] || file_exists($files['textFile']['tmp_name'] ?? '')) ||
(!$params['upload_type'] && $params['text_message'])
) {
// FIXME: Shouldn't the X-Forwarded-Proto check be part of CRM_Utils_System::isSSL()?
if (Civi::settings()->get('enableSSL') &&
!self::isSSL() &&
- strtolower(CRM_Utils_Array::value('X_FORWARDED_PROTO', $req_headers)) != 'https'
+ strtolower($req_headers['X_FORWARDED_PROTO'] ?? '') != 'https'
) {
// ensure that SSL is enabled on a civicrm url (for cookie reasons etc)
$url = "https://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}";
*/
function civicrm_api3_generic_getfields($apiRequest, $unique = TRUE) {
static $results = [];
- if ((CRM_Utils_Array::value('cache_clear', $apiRequest['params']))) {
+ if (!empty($apiRequest['params']['cache_clear'])) {
$results = [];
// we will also clear pseudoconstants here - should potentially be moved to relevant BAO classes
CRM_Core_PseudoConstant::flush();