}
if (
- !is_numeric(CRM_Utils_Array::value('geo_code_1', $proximityAddress)) ||
- !is_numeric(CRM_Utils_Array::value('geo_code_2', $proximityAddress))
+ !is_numeric($proximityAddress['geo_code_1'] ?? '') ||
+ !is_numeric($proximityAddress['geo_code_2'] ?? '')
) {
// we are setting the where clause to 0 here, so we wont return anything
$qill .= ': ' . ts('We could not geocode the destination address.');
CRM_Contact_BAO_Contact::processImageParams($params);
}
- if (is_numeric(CRM_Utils_Array::value('current_employer_id', $params)) && !empty($params['current_employer'])) {
+ if (is_numeric($params['current_employer_id'] ?? '') && !empty($params['current_employer'])) {
$params['current_employer'] = $params['current_employer_id'];
}
$result->contact_id
);
}
- elseif ((is_numeric(CRM_Utils_Array::value('geo_code_1', $row))) ||
+ elseif ((is_numeric($row['geo_code_1'] ?? '')) ||
(!empty($row['city']) && !empty($row['state_province']))
) {
$row['action'] = CRM_Core_Action::formLink(
$mask = CRM_Core_Action::mask(array_merge([CRM_Core_Permission::VIEW], $basicPermissions));
}
- if ((!is_numeric(CRM_Utils_Array::value('geo_code_1', $row))) &&
+ if ((!is_numeric($row['geo_code_1'] ?? '')) &&
(empty($row['city']) || empty($row['state_province']))
) {
$mask = $mask & 4095;
$saveMappingFields['name'] = $v['4'] ?? NULL;
}
- if (is_numeric(CRM_Utils_Array::value('3', $v))) {
+ if (is_numeric($v['3'] ?? '')) {
$locationTypeId = $v['3'] ?? NULL;
}
- elseif (is_numeric(CRM_Utils_Array::value('5', $v))) {
+ elseif (is_numeric($v['5'] ?? '')) {
$locationTypeId = $v['5'] ?? NULL;
}
- if (is_numeric(CRM_Utils_Array::value('4', $v))) {
+ if (is_numeric($v['4'] ?? '')) {
if ($saveMappingFields['name'] === 'im') {
$saveMappingFields['im_provider_id'] = $v[4];
}
$saveMappingFields['phone_type_id'] = $v['4'] ?? NULL;
}
}
- elseif (is_numeric(CRM_Utils_Array::value('6', $v))) {
+ elseif (is_numeric($v['6'] ?? '')) {
$saveMappingFields['phone_type_id'] = $v['6'] ?? NULL;
}
$ids = [];
$params = ['entity_id' => $dao->id, 'entity_table' => 'civicrm_event'];
$values['location'] = CRM_Core_BAO_Location::getValues($params, TRUE);
- if (is_numeric(CRM_Utils_Array::value('geo_code_1', $values['location']['address'][1])) ||
+ if (is_numeric($values['location']['address'][1]['geo_code_1'] ?? '') ||
(
!empty($values['location']['address'][1]['city']) &&
!empty($values['location']['address'][1]['state_province_id'])
// chk for renewal for multiple terms CRM-8750
$numRenewTerms = 1;
- if (is_numeric(CRM_Utils_Array::value('num_terms', $this->_params))) {
+ if (is_numeric($this->_params['num_terms'] ?? '')) {
$numRenewTerms = $this->_params['num_terms'];
}
}
}
- if ((is_numeric(CRM_Utils_Array::value('count', $fields)) &&
+ if ((is_numeric($fields['count'] ?? '') &&
empty($fields['count'])
) &&
(($fields['html_type'] ?? NULL) == 'Text')
$field = $vars[$key];
$fieldArray = explode('-', $field['name']);
$fieldType = $fieldArray['2'] ?? NULL;
- if (is_numeric(CRM_Utils_Array::value('1', $fieldArray))) {
+ if (is_numeric($fieldArray['1'] ?? '')) {
if (!in_array($fieldType, $multipleFields)) {
$locationType = new CRM_Core_DAO_LocationType();
$locationType->id = $fieldArray[1];
}
if (array_key_exists('reply_id', $this->_params['fields']) ||
- is_numeric(CRM_Utils_Array::value('is_replied_value', $this->_params))
+ is_numeric($this->_params['is_replied_value'] ?? '')
) {
if (($this->_params['is_replied_value'] ?? NULL) == 1) {
$joinType = 'INNER';
}
if (array_key_exists('unsubscribe_id', $this->_params['fields']) ||
- is_numeric(CRM_Utils_Array::value('is_unsubscribed_value', $this->_params))
+ is_numeric($this->_params['is_unsubscribed_value'] ?? '')
) {
if (($this->_params['is_unsubscribed_value'] ?? NULL) == 1
) {
}
if (array_key_exists('optout_id', $this->_params['fields']) ||
- is_numeric(CRM_Utils_Array::value('is_optout_value', $this->_params))
+ is_numeric($this->_params['is_optout_value'] ?? '')
) {
if (($this->_params['is_optout_value'] ?? NULL) == 1) {
$joinType = 'INNER';
}
if (array_key_exists('forward_id', $this->_params['fields']) ||
- is_numeric(CRM_Utils_Array::value('is_forwarded_value', $this->_params))
+ is_numeric($this->_params['is_forwarded_value'] ?? '')
) {
if (($this->_params['is_forwarded_value'] ?? NULL) == 1) {
$joinType = 'INNER';
function civicrm_api3_generic_getcount($apiRequest) {
$apiRequest['params']['options']['is_count'] = TRUE;
$result = civicrm_api($apiRequest['entity'], 'get', $apiRequest['params']);
- if (is_numeric(CRM_Utils_Array::value('values', $result))) {
+ if (is_numeric($result['values'] ?? '')) {
return (int) $result['values'];
}
if (!isset($result['count'])) {
public function formRule($fields, $files, $self) {
$this->addGeocodingData($fields);
- if (!is_numeric(CRM_Utils_Array::value('geo_code_1', $fields)) ||
- !is_numeric(CRM_Utils_Array::value('geo_code_2', $fields)) ||
+ if (!is_numeric($fields['geo_code_1'] ?? '') ||
+ !is_numeric($fields['geo_code_2'] ?? '') ||
!isset($fields['distance'])
) {
$errorMessage = ts('Could not determine co-ordinates for provided data');