mirror of
https://github.com/standardebooks/web.git
synced 2025-07-07 07:10:29 -04:00
Update setcookie() for PHP8 compatibility
This commit is contained in:
parent
76cf0d296a
commit
d4707eb595
2 changed files with 4 additions and 4 deletions
|
@ -82,7 +82,7 @@ class Session extends PropertiesBase{
|
|||
}
|
||||
|
||||
public static function SetSessionCookie(string $sessionId): void{
|
||||
setcookie('sessionid', $sessionId, time() + 60 * 60 * 24 * 14 * 1, '/', SITE_DOMAIN, true, false); // Expires in two weeks
|
||||
setcookie('sessionid', $sessionId, ['expires' => strtotime('+1 week'), 'path' => '/', 'domain' => SITE_DOMAIN, 'secure' => true, 'httponly' => false, 'samesite' => 'Lax']); // Expires in two weeks
|
||||
}
|
||||
|
||||
public static function Get(?string $sessionId): Session{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue