From fec554bb05136b1559a77eb20040b7b372db038b Mon Sep 17 00:00:00 2001 From: 19ATF72 Date: Tue, 5 Dec 2023 03:53:10 -0800 Subject: [PATCH] Fix string parameter being passed non string variable --- CRM/Mailing/BAO/MailingComponent.php | 2 +- ext/civi_mail/Civi/Api4/MailingComponent.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CRM/Mailing/BAO/MailingComponent.php b/CRM/Mailing/BAO/MailingComponent.php index f015b5cb91..cc5212f44e 100644 --- a/CRM/Mailing/BAO/MailingComponent.php +++ b/CRM/Mailing/BAO/MailingComponent.php @@ -58,7 +58,7 @@ class CRM_Mailing_BAO_MailingComponent extends CRM_Mailing_DAO_MailingComponent $component->copyValues($params); if (empty($id) && empty($params['body_text'])) { - $component->body_text = CRM_Utils_String::htmlToText(CRM_Utils_Array::value('body_html', $params)); + $component->body_text = CRM_Utils_String::htmlToText($params['body_html'] ?? ''); } if ($component->is_default) { diff --git a/ext/civi_mail/Civi/Api4/MailingComponent.php b/ext/civi_mail/Civi/Api4/MailingComponent.php index 62d0d3fcd9..5aec1c4ae3 100644 --- a/ext/civi_mail/Civi/Api4/MailingComponent.php +++ b/ext/civi_mail/Civi/Api4/MailingComponent.php @@ -12,7 +12,7 @@ namespace Civi\Api4; /** * MailingComponent - * + * * @searchable secondary * @since 5.70 * @package Civi\Api4 -- 2.25.1