Skip to content

Commit

Permalink
Merge pull request #37 from punktDeForks/bugfix/Issue-36-adjust-condi…
Browse files Browse the repository at this point in the history
…tion

BUGFIX: Issue #36 adjust condition in php according to js
  • Loading branch information
Nikdro authored Oct 15, 2021
2 parents 0b6df19 + f866af1 commit 5619d1e
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 5619d1e

Please sign in to comment.