diff --git a/CRM/Campaign/Page/Petition/Confirm.php b/CRM/Campaign/Page/Petition/Confirm.php index ca31c36b0d00..77d7d1d9c2d8 100644 --- a/CRM/Campaign/Page/Petition/Confirm.php +++ b/CRM/Campaign/Page/Petition/Confirm.php @@ -58,10 +58,12 @@ public function run() { $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; diff --git a/CRM/Core/BAO/CustomValueTable.php b/CRM/Core/BAO/CustomValueTable.php index 1b2c0003de45..f2d7199d98d0 100644 --- a/CRM/Core/BAO/CustomValueTable.php +++ b/CRM/Core/BAO/CustomValueTable.php @@ -249,7 +249,7 @@ public static function create($customParams, $parentOperation = NULL) { || $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; } } diff --git a/CRM/Report/Form.php b/CRM/Report/Form.php index 95b08b81de28..33b3b96d94c9 100644 --- a/CRM/Report/Form.php +++ b/CRM/Report/Form.php @@ -3540,11 +3540,11 @@ public function filterStat(&$statistics) { 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'])) { @@ -3648,7 +3648,7 @@ public function getTemplateFileName() { */ 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); } diff --git a/api/v3/Relationship.php b/api/v3/Relationship.php index 0c4251254fac..f79b26c64501 100644 --- a/api/v3/Relationship.php +++ b/api/v3/Relationship.php @@ -87,10 +87,10 @@ function civicrm_api3_relationship_get($params) { } 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,