Skip to content

Commit

Permalink
Remove always-true empty check
Browse files Browse the repository at this point in the history
Per civicrm#27192

hidden_CreditCard is always empty so the check is meaningless.

The newer boolean token check is safer than the quoted string check
  • Loading branch information
eileenmcnaughton authored and larssandergreen committed Sep 6, 2023
1 parent 754432c commit e372e54
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@
</tr>
{/if}

{if '{contribution.payment_instrument_id}' and empty($formValues.hidden_CreditCard)}
{if {contribution.payment_instrument_id|boolean}}
<tr>
<td {$labelStyle}>
{ts}Paid By{/ts}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
{if '{contribution.receipt_date}'}
{ts}Receipt Date{/ts}: {contribution.receipt_date|crmDate:"shortdate"}
{/if}
{if '{contribution.payment_instrument_id}' and empty($formValues.hidden_CreditCard)}
{if {contribution.payment_instrument_id|boolean}}
{ts}Paid By{/ts}: {contribution.payment_instrument_id:label}
{if '{contribution.check_number}'}
{ts}Check Number{/ts}: {contribution.check_number}
Expand Down

0 comments on commit e372e54

Please sign in to comment.