From f866af1b9be6362b9a7fe1f2072867575994e045 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Hoffmann?= Date: Fri, 15 Oct 2021 12:50:35 +0200 Subject: [PATCH] BUGFIX: Issue #36 adjust condition in php according to js --- Classes/Controller/JavaScriptController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Classes/Controller/JavaScriptController.php b/Classes/Controller/JavaScriptController.php index c2022d5..e189b7a 100644 --- a/Classes/Controller/JavaScriptController.php +++ b/Classes/Controller/JavaScriptController.php @@ -88,7 +88,7 @@ function ($key) { $decisionTtl = $cookieSettings->getProperty('decisionTtl') ?? 0; $expireDate = clone $consentDate; $expireDate->add(\DateInterval::createFromDateString($decisionTtl . ' seconds')); - if ($expireDate < new \DateTime('now')) { + if ($decisionTtl > 0 && $expireDate < new \DateTime('now')) { $this->response->setContentType('text/javascript'); $this->response->setContent(''); return;