$this->_ufGroup = (array) $dao;
}
- if (!CRM_Utils_Array::value('is_active', $this->_ufGroup)) {
+ if (empty($this->_ufGroup['is_active'])) {
CRM_Core_Error::fatal(ts('The requested profile (gid=%1) is inactive or does not exist.', [
1 => $this->_gid,
]));
$addCaptcha[$field['group_id']] = $field['add_captcha'];
}
- if (($name == 'email-Primary') || ($name == 'email-' . isset($primaryLocationType) ? $primaryLocationType : "")) {
+ if (($name == 'email-Primary') || ($name == 'email-' . $primaryLocationType ?? "")) {
$emailPresent = TRUE;
$this->_mail = $name;
}
if (!$register && empty($fields['_qf_Edit_upload_duplicate'])) {
// fix for CRM-3240
if (!empty($fields['email-Primary'])) {
- $fields['email'] = CRM_Utils_Array::value('email-Primary', $fields);
+ $fields['email'] = $fields['email-Primary'] ?? NULL;
}
// fix for CRM-6141
}
}
- $addToGroupId = CRM_Utils_Array::value('add_to_group_id', $this->_ufGroup);
+ $addToGroupId = $this->_ufGroup['add_to_group_id'] ?? NULL;
if (!empty($addToGroupId)) {
//run same check whether group is a mailing list
$groupTypes = CRM_Core_DAO::getFieldValue('CRM_Contact_DAO_Group',