- $defaults['total_amount'] = CRM_Utils_Array::value('scheduled_amount', $this->_pledgeValues['pledgePayment']);
- $defaults['financial_type_id'] = CRM_Utils_Array::value('financial_type_id', $this->_pledgeValues);
- $defaults['currency'] = CRM_Utils_Array::value('currency', $this->_pledgeValues);
+ $defaults['total_amount'] = $this->_pledgeValues['pledgePayment']['scheduled_amount'] ?? NULL;
+ $defaults['financial_type_id'] = $this->_pledgeValues['financial_type_id'] ?? NULL;
+ $defaults['currency'] = $this->_pledgeValues['currency'] ?? NULL;