$pparams['id'] = $petition_id;
$this->petition = [];
CRM_Campaign_BAO_Survey::retrieve($pparams, $this->petition);
- $this->assign('is_share', CRM_Utils_Array::value('is_share', $this->petition));
- $this->assign('thankyou_title', CRM_Utils_Array::value('thankyou_title', $this->petition));
- $this->assign('thankyou_text', CRM_Utils_Array::value('thankyou_text', $this->petition));
- CRM_Utils_System::setTitle(CRM_Utils_Array::value('thankyou_title', $this->petition));
+ $this->assign('is_share', $this->petition['is_share'] ?? FALSE);
+ $this->assign('thankyou_title', $this->petition['thankyou_title'] ?? '');
+ $this->assign('thankyou_text', $this->petition['thankyou_text'] ?? '');
+ if (!empty($this->petition['thankyou_title'])) {
+ CRM_Utils_System::setTitle($this->petition['thankyou_title']);
+ }
// send thank you email
$params['contactId'] = $contact_id;
|| $fieldExtends === 'Organization'
|| $fieldExtends === 'Household'
) {
- $paramFieldsExtendContactForEntities[$entityID]['custom_' . CRM_Utils_Array::value('custom_field_id', $field)] = $field['custom_field_id'] ?? NULL;
+ $paramFieldsExtendContactForEntities[$entityID]['custom_' . ($field['custom_field_id'] ?? '')] = $field['custom_field_id'] ?? NULL;
}
}
isset($field['options']) &&
is_array($field['options']) && !empty($field['options'])
) {
- $value = CRM_Utils_Array::value($op, $pair) . " " .
+ $value = ($pair[$op] ?? '') . " " .
CRM_Utils_Array::value($val, $field['options'], $val);
}
elseif ($val || $val == '0') {
- $value = CRM_Utils_Array::value($op, $pair) . " " . $val;
+ $value = ($pair[$op] ?? '') . " " . $val;
}
}
if ($value && empty($field['no_display'])) {
*/
public function compileContent() {
$templateFile = $this->getHookedTemplateFileName();
- return CRM_Utils_Array::value('report_header', $this->_formValues) .
+ return ($this->_formValues['report_header'] ?? '') .
CRM_Core_Form::$_template->fetch($templateFile) .
CRM_Utils_Array::value('report_footer', $this->_formValues);
}
}
else {
$relationships = CRM_Contact_BAO_Relationship::getRelationship($params['contact_id'],
- CRM_Utils_Array::value('status_id', $params),
+ $params['status_id'] ?? 0,
0,
- CRM_Utils_Array::value('is_count', $options),
- CRM_Utils_Array::value('id', $params),
+ $options['is_count'] ?? 0,
+ $params['id'] ?? 0,
NULL,
NULL,
FALSE,