From 4fbf91e94024b91accce705b2b1cb42c637d0480 Mon Sep 17 00:00:00 2001 From: Dave Mc Nicoll Date: Mon, 19 May 2025 13:32:11 +0000 Subject: [PATCH] - Set default Cookie expiry time to 8 hours --- src/Cookie.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Cookie.php b/src/Cookie.php index b70effa..183718f 100644 --- a/src/Cookie.php +++ b/src/Cookie.php @@ -5,7 +5,7 @@ namespace Storage; class Cookie { public array $options = [ - 'expires' => 0, + 'expires' => (60*60*8), # Default to 8 hours now 'path' => null, 'domain' => null, 'secure' => false, @@ -49,7 +49,7 @@ class Cookie { $key = $this->normalizeKey($key); - $expires = ! $expires ? 0 : time() + (int) $expires; + $expires = ! $expires ? 0 : (time() + $expires); $_COOKIE[$key] = $value;