From 10a359674a3a760e9937f53a3cc4c8fc28f9be2c Mon Sep 17 00:00:00 2001 From: eileen Date: Tue, 8 Jan 2019 11:32:03 +1300 Subject: [PATCH] Fix php 7.2 countable warning per https://lab.civicrm.org/dev/core/issues/406#note_12393 Warning: count(): Parameter must be an array or an object that implements Countable in CRM_Event_Form_Participant->submit() (line 1722 of .../all/modules/civicrm/CRM/Event/Form/Participant.php). --- CRM/Event/Form/Participant.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CRM/Event/Form/Participant.php b/CRM/Event/Form/Participant.php index b8b9b68abc..fdb9cacd84 100644 --- a/CRM/Event/Form/Participant.php +++ b/CRM/Event/Form/Participant.php @@ -1719,7 +1719,7 @@ class CRM_Event_Form_Participant extends CRM_Contribute_Form_AbstractEditPayment ); $prefixValue = Civi::settings()->get('contribution_invoice_settings'); $invoicing = CRM_Utils_Array::value('invoicing', $prefixValue); - if (count($taxAmt) > 0 && (isset($invoicing) && isset($prefixValue['is_email_pdf']))) { + if (!empty($taxAmt) && (isset($invoicing) && isset($prefixValue['is_email_pdf']))) { $sendTemplateParams['isEmailPdf'] = TRUE; $sendTemplateParams['contributionId'] = $contributionId; } -- 2.25.1