Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
4fbf91e940 | |||
4f4443eb1a |
@ -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;
|
||||||
|
|
||||||
@ -163,6 +163,6 @@ class Cookie {
|
|||||||
|
|
||||||
protected function normalizeKey(string $key) : string
|
protected function normalizeKey(string $key) : string
|
||||||
{
|
{
|
||||||
return str_replace([',', ';', ' ', '='], '_', $key);
|
return str_replace([',', ';', ' ', '=', '.'], '_', $key);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user