From: ginkgoMZD Date: Wed, 23 Mar 2022 13:56:38 +0000 (-0400) Subject: resolve TypeError: unsupported operand types: string + int; X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=242f332b776384c50b483a7bffbbbf48d598d27a;p=civicrm-core.git resolve TypeError: unsupported operand types: string + int; --- diff --git a/templates/CRM/Price/Form/LineItem.tpl b/templates/CRM/Price/Form/LineItem.tpl index 7502e850ad..e94853330f 100644 --- a/templates/CRM/Price/Form/LineItem.tpl +++ b/templates/CRM/Price/Form/LineItem.tpl @@ -124,7 +124,8 @@ {assign var="lineItemCount" value=0} {foreach from=$pcount item=p_count} - {assign var="lineItemCount" value=$lineItemCount+$p_count.participant_count} + {assign var="intPCount" value=$p_count.participant_count|intval} + {assign var="lineItemCount" value=$lineItemCount+$intPCount} {/foreach} {if $lineItemCount < 1 } {assign var="lineItemCount" value=1} diff --git a/templates/CRM/Price/Page/LineItem.tpl b/templates/CRM/Price/Page/LineItem.tpl index 7bac227eb9..d2c55bebcb 100644 --- a/templates/CRM/Price/Page/LineItem.tpl +++ b/templates/CRM/Price/Page/LineItem.tpl @@ -111,7 +111,8 @@ {assign var="lineItemCount" value=0} {foreach from=$pcount item=p_count} - {assign var="lineItemCount" value=$lineItemCount+$p_count.participant_count} + {assign var="intPCount" value=$p_count.participant_count|intval} + {assign var="lineItemCount" value=$lineItemCount+$intPCount} {/foreach} {if $lineItemCount < 1 } {assign var="lineItemCount" value=1}