From 78e2a1b0ae30e711bcca0e6a1daa62dd3b47f52b Mon Sep 17 00:00:00 2001 From: Amir Arends <48568142+amirarends@users.noreply.github.com> Date: Wed, 14 Aug 2024 13:45:28 +0200 Subject: [PATCH] Update DmailController.php --- Classes/Module/DmailController.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Classes/Module/DmailController.php b/Classes/Module/DmailController.php index a634b7aa1..0a3ae54d5 100644 --- a/Classes/Module/DmailController.php +++ b/Classes/Module/DmailController.php @@ -1899,8 +1899,9 @@ public function createDirectMailRecordFromPage(int $pageUid, array $parameters, if ($newRecord['sys_language_uid'] > 0) { $langParam = $this->getLanguageParam($newRecord['sys_language_uid'], $parameters); - $parameters['plainParams'] .= $langParam; - $parameters['HTMLParams'] .= $langParam; + foreach (['plainParams', 'HTMLParams'] as $param) { + $parameters[$param] = empty($parameters[$param]) ? $langParam : $parameters[$param] . $langParam; + } } // If params set, set default values: