From b5eec332e81b3bf59e7a7acefc90130d6866755f Mon Sep 17 00:00:00 2001 From: Bradley Taylor Date: Sun, 6 Feb 2022 17:20:19 +0000 Subject: [PATCH] Cast value to int before performing math --- CRM/Batch/Form/Entry.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Batch/Form/Entry.php b/CRM/Batch/Form/Entry.php index 2818626e95..c523454cc6 100644 --- a/CRM/Batch/Form/Entry.php +++ b/CRM/Batch/Form/Entry.php @@ -425,7 +425,7 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form { $batchTotal = 0; foreach ($params['field'] as $key => $value) { - $batchTotal += $value['total_amount']; + $batchTotal += ($value['total_amount'] ?: 0); //validate for soft credit fields if (!empty($params['soft_credit_contact_id'][$key]) && empty($params['soft_credit_amount'][$key])) { -- 2.25.1