From c71600aa66e2c8ce239454355c02a903abd4506d Mon Sep 17 00:00:00 2001 From: Avior Date: Fri, 26 Apr 2019 15:22:41 +0200 Subject: [PATCH] Fixed ttl thinking 0 was false that was setting the TTL to the default value --- src/DeltaCMS/Cache/SessionCache.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/DeltaCMS/Cache/SessionCache.php b/src/DeltaCMS/Cache/SessionCache.php index 2b5b4ab..888460d 100644 --- a/src/DeltaCMS/Cache/SessionCache.php +++ b/src/DeltaCMS/Cache/SessionCache.php @@ -42,7 +42,7 @@ class SessionCache extends AbstractCache } $_SESSION[$key] = array( "value" => $value, - "ttl" => time() + ($ttl != null ? $this->getTTL($ttl) : $this->ttl) + "ttl" => time() + ($ttl !== null ? $this->getTTL($ttl) : $this->ttl) ); return true; }