Skip to content

Commit c86e357

Browse files
committed
[BUGFIX] Remove extbase debugger markup in MailFactory.php
There is the rare chance that some extbase debugger code is saved in the database in the body field of mails. Switching to another function solves the issue. Related in2code-pro/powermail#3 Related #897 Fixes #920
1 parent 4fc5e40 commit c86e357

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Classes/Domain/Factory/MailFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
use In2code\Powermail\Utility\SessionUtility;
1212
use TYPO3\CMS\Core\Configuration\Exception\ExtensionConfigurationExtensionNotConfiguredException;
1313
use TYPO3\CMS\Core\Configuration\Exception\ExtensionConfigurationPathDoesNotExistException;
14-
use TYPO3\CMS\Core\Utility\DebugUtility;
14+
use TYPO3\CMS\Core\Utility\ArrayUtility;
1515
use TYPO3\CMS\Core\Utility\GeneralUtility;
1616
use TYPO3\CMS\Extbase\Object\Exception;
1717
use TYPO3\CMS\Extbase\SignalSlot\Exception\InvalidSlotException;
@@ -42,7 +42,7 @@ public function prepareMailForPersistence(Mail $mail, array $settings): void
4242
->setSenderName($mailRepository->getSenderNameFromArguments($mail))
4343
->setSubject($settings['receiver']['subject'])
4444
->setReceiverMail($settings['receiver']['email'])
45-
->setBody(DebugUtility::viewArray($mailRepository->getVariablesWithMarkersFromMail($mail)))
45+
->setBody(ArrayUtility::arrayExport($mailRepository->getVariablesWithMarkersFromMail($mail)))
4646
->setSpamFactor(SessionUtility::getSpamFactorFromSession())
4747
->setTime((time() - SessionUtility::getFormStartFromSession($mail->getForm()->getUid(), $settings)))
4848
->setUserAgent(GeneralUtility::getIndpEnv('HTTP_USER_AGENT'))

0 commit comments

Comments
 (0)