if (CRM_Financial_BAO_FinancialType::isACLFinancialTypeStatus() && $this->_action & CRM_Core_Action::UPDATE) {
$financialTypeID = CRM_Contribute_PseudoConstant::financialType($this->_values['financial_type_id']);
if (!CRM_Core_Permission::check('edit contributions of type ' . $financialTypeID)) {
- CRM_Core_Error::fatal(ts('You do not have permission to access this page.'));
+ CRM_Core_Error::statusBounce(ts('You do not have permission to access this page.'));
}
}
$this->applyFilter('__ALL__', 'trim');
$session = CRM_Core_Session::singleton();
- $this->_cancelURL = CRM_Utils_Array::value('cancelURL', $_POST);
+ $this->_cancelURL = $_POST['cancelURL'] ?? NULL;
if (!$this->_cancelURL) {
$this->_cancelURL = CRM_Utils_System::url('civicrm/admin/contribute', 'reset=1');
'is_pledge_start_date_editable',
];
foreach ($pledgeBlock as $key) {
- $defaults[$key] = CRM_Utils_Array::value($key, $pledgeBlockDefaults);
+ $defaults[$key] = $pledgeBlockDefaults[$key] ?? NULL;
if ($key == 'pledge_start_date' && !empty($pledgeBlockDefaults[$key])) {
$defaultPledgeDate = (array) json_decode($pledgeBlockDefaults['pledge_start_date']);
$pledgeDateFields = [