projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8990a43
)
Cast value to int before performing math
author
Bradley Taylor
<hello@brad-taylor.co.uk>
Sun, 6 Feb 2022 17:20:19 +0000
(17:20 +0000)
committer
Bradley Taylor
<hello@brad-taylor.co.uk>
Mon, 7 Feb 2022 19:15:42 +0000
(19:15 +0000)
CRM/Batch/Form/Entry.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Batch/Form/Entry.php
b/CRM/Batch/Form/Entry.php
index 2818626e9573a72637bdedc469fa558a85c8641a..c523454cc60bd5585acc0f57f32de2799e791f06 100644
(file)
--- 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])) {