Skip to content

Commit

Permalink
BUGFIX: Issue #36 adjust condition in php according to js
Browse files Browse the repository at this point in the history
  • Loading branch information
andrehoffmann30 committed Oct 15, 2021
1 parent 0b6df19 commit f866af1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Classes/Controller/JavaScriptController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f866af1

Please sign in to comment.