From 8cb5f511de0495df4340c232122a300311738a0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20K=C3=B6nig?= Date: Mon, 29 Jan 2024 15:25:02 +0100 Subject: [PATCH] [BUGFIX] forms with disabled gdpr checkbox - PHP Warning: Undefined array key tx_cspowermailgdpr_accepted --- .../FormControllerCreateActionBeforeRenderViewEventListener.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/EventListener/FormControllerCreateActionBeforeRenderViewEventListener.php b/Classes/EventListener/FormControllerCreateActionBeforeRenderViewEventListener.php index 8de7533..8cbc11e 100644 --- a/Classes/EventListener/FormControllerCreateActionBeforeRenderViewEventListener.php +++ b/Classes/EventListener/FormControllerCreateActionBeforeRenderViewEventListener.php @@ -11,7 +11,7 @@ class FormControllerCreateActionBeforeRenderViewEventListener public function __invoke(FormControllerCreateActionBeforeRenderViewEvent $event) { $mail = $event->getMail(); - if (!$mail->isTxCspowermailgdprAccepted()) { + if (!$mail->getForm()->isTxCspowermailgdprHidden() && !$mail->isTxCspowermailgdprAccepted()) { $mail->setTxCspowermailgdprAccepted(self::checkParam()); } }