diff --git a/typo3/sysext/fluid/Classes/View/StandaloneView.php b/typo3/sysext/fluid/Classes/View/StandaloneView.php index f76f0c6f4e08e1a26d34e28801278e364b43a4f7..18029fc313b01f5c0176a1cfd969b6e6f9b880c4 100644 --- a/typo3/sysext/fluid/Classes/View/StandaloneView.php +++ b/typo3/sysext/fluid/Classes/View/StandaloneView.php @@ -47,7 +47,7 @@ class StandaloneView extends AbstractTemplateView } /** - * @internal Currently used especially in functional tests. May change. + * @internal */ public function setRequest(?ServerRequestInterface $request = null): void { diff --git a/typo3/sysext/form/Classes/Domain/Finishers/ConfirmationFinisher.php b/typo3/sysext/form/Classes/Domain/Finishers/ConfirmationFinisher.php index 9092fb5f36b28c9f907dc7fb36e4b2f4b705bdd0..dc5f40f6f4c303b01cf82e3e876f3c6939996645 100644 --- a/typo3/sysext/form/Classes/Domain/Finishers/ConfirmationFinisher.php +++ b/typo3/sysext/form/Classes/Domain/Finishers/ConfirmationFinisher.php @@ -126,6 +126,7 @@ class ConfirmationFinisher extends AbstractFinisher protected function initializeStandaloneView(FormRuntime $formRuntime): StandaloneView { $standaloneView = GeneralUtility::makeInstance(StandaloneView::class); + $standaloneView->setRequest($this->finisherContext->getRequest()); if (!isset($this->options['templateName'])) { throw new FinisherException( diff --git a/typo3/sysext/form/Classes/Domain/Finishers/EmailFinisher.php b/typo3/sysext/form/Classes/Domain/Finishers/EmailFinisher.php index 395e6a84f600094aa2473cae1b1ba6196444c50c..f81d9ccb1c25452b6481953ab02c7db2684257b4 100644 --- a/typo3/sysext/form/Classes/Domain/Finishers/EmailFinisher.php +++ b/typo3/sysext/form/Classes/Domain/Finishers/EmailFinisher.php @@ -17,7 +17,6 @@ declare(strict_types=1); namespace TYPO3\CMS\Form\Domain\Finishers; -use Psr\Http\Message\ServerRequestInterface; use Symfony\Component\Mime\Address; use TYPO3\CMS\Core\Mail\FluidEmail; use TYPO3\CMS\Core\Mail\MailerInterface; @@ -203,12 +202,8 @@ class EmailFinisher extends AbstractFinisher $this->options['templateName'] = 'Default'; } - // Set the PSR-7 request object if available - if (($GLOBALS['TYPO3_REQUEST'] ?? null) instanceof ServerRequestInterface) { - $fluidEmail->setRequest($GLOBALS['TYPO3_REQUEST']); - } - $fluidEmail + ->setRequest($this->finisherContext->getRequest()) ->setTemplate($this->options['templateName']) ->assignMultiple([ 'finisherVariableProvider' => $this->finisherContext->getFinisherVariableProvider(),