- Set default Cookie expiry time to 8 hours
This commit is contained in:
parent
4f4443eb1a
commit
4fbf91e940
@ -5,7 +5,7 @@ namespace Storage;
|
|||||||
class Cookie {
|
class Cookie {
|
||||||
|
|
||||||
public array $options = [
|
public array $options = [
|
||||||
'expires' => 0,
|
'expires' => (60*60*8), # Default to 8 hours now
|
||||||
'path' => null,
|
'path' => null,
|
||||||
'domain' => null,
|
'domain' => null,
|
||||||
'secure' => false,
|
'secure' => false,
|
||||||
@ -49,7 +49,7 @@ class Cookie {
|
|||||||
|
|
||||||
$key = $this->normalizeKey($key);
|
$key = $this->normalizeKey($key);
|
||||||
|
|
||||||
$expires = ! $expires ? 0 : time() + (int) $expires;
|
$expires = ! $expires ? 0 : (time() + $expires);
|
||||||
|
|
||||||
$_COOKIE[$key] = $value;
|
$_COOKIE[$key] = $value;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user