From edf2030432b6af41aaf80b916a7be3be1d9d7603 Mon Sep 17 00:00:00 2001 From: Seamus Lee Date: Wed, 20 Oct 2021 09:06:24 +1100 Subject: [PATCH] [REF] Fix PDF Test failure on php versions 7.4 and later --- CRM/Contribute/Form/Task/PDF.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Contribute/Form/Task/PDF.php b/CRM/Contribute/Form/Task/PDF.php index 77f777315d..2a9ea95e45 100644 --- a/CRM/Contribute/Form/Task/PDF.php +++ b/CRM/Contribute/Form/Task/PDF.php @@ -180,10 +180,10 @@ AND {$this->_componentClause}"; $mail = CRM_Contribute_BAO_Contribution::sendMail($input, $ids, $contribID, $elements['createPdf']); - if ($mail['html']) { + if (!empty($mail['html'])) { $message[] = $mail['html']; } - else { + elseif (!empty($mail['body'])) { $message[] = nl2br($mail['body']); } -- 2.25.1