mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-10 05:58:42 +00:00
Use setcookie options array
This commit is contained in:
parent
580db7a9d6
commit
8ae435998f
|
|
@ -98,7 +98,7 @@ final class CookieJar
|
||||||
if ($overwrite || !isset($this->cookies[$id])) {
|
if ($overwrite || !isset($this->cookies[$id])) {
|
||||||
$this->cookies[$id] = [
|
$this->cookies[$id] = [
|
||||||
'value' => $value,
|
'value' => $value,
|
||||||
'expiry' => $expire,
|
'expires' => $expire,
|
||||||
'path' => $path,
|
'path' => $path,
|
||||||
'domain' => $domain,
|
'domain' => $domain,
|
||||||
'secure' => $secure,
|
'secure' => $secure,
|
||||||
|
|
@ -194,7 +194,14 @@ final class CookieJar
|
||||||
|
|
||||||
// @codeCoverageIgnoreStart
|
// @codeCoverageIgnoreStart
|
||||||
foreach ($this->cookies as $key => $cookie) {
|
foreach ($this->cookies as $key => $cookie) {
|
||||||
\setcookie($key, $cookie['value'], $cookie['expiry'], $cookie['path'], $cookie['domain'], $cookie['secure'], $cookie['httponly'], 'Strict');
|
\setcookie($key, $cookie['value'], [
|
||||||
|
'expires' => $cookie['expires'],
|
||||||
|
'path' => $cookie['path'],
|
||||||
|
'domain' => $cookie['domain'],
|
||||||
|
'secure' => $cookie['secure'],
|
||||||
|
'httponly' => $cookie['httponly'],
|
||||||
|
'samesite' => 'Strict'
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
// @codeCoverageIgnoreEnd
|
// @codeCoverageIgnoreEnd
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user