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:
1f3b801
)
PHP8.1 - prices must be numbers, not strings for arithmetic
author
Jon Goldberg
<jon@megaphonetech.com>
Fri, 2 Dec 2022 16:22:11 +0000
(11:22 -0500)
committer
Jon Goldberg
<jon@megaphonetech.com>
Fri, 2 Dec 2022 19:50:07 +0000
(14:50 -0500)
CRM/Price/BAO/LineItem.php
patch
|
blob
|
blame
|
history
diff --git
a/CRM/Price/BAO/LineItem.php
b/CRM/Price/BAO/LineItem.php
index 6399dade3d31585a4b2eaf9e0eb6728f9a12d5b6..b153763e2a6ea15cdf5b41a74b03d8a280e5807a 100644
(file)
--- a/
CRM/Price/BAO/LineItem.php
+++ b/
CRM/Price/BAO/LineItem.php
@@
-302,9
+302,10
@@
WHERE li.contribution_id = %1";
}
foreach ($params["price_{$fid}"] as $oid => $qty) {
- $price = $amount_override === NULL ? $options[$oid]['amount'] : $amount_override;
+ $qty = (int) $qty;
+ $price = (float) ($amount_override === NULL ? $options[$oid]['amount'] : $amount_override);
- $participantsPerField = CRM_Utils_Array::value('count', $options[$oid], 0);
+ $participantsPerField =
(int)
CRM_Utils_Array::value('count', $options[$oid], 0);
$values[$oid] = [
'price_field_id' => $fid,