mirror of
https://github.com/standardebooks/web.git
synced 2025-07-15 19:06:49 -04:00
Update setcookie() to use PHP 7.2 signature
This commit is contained in:
parent
11224136d1
commit
71664246c0
1 changed files with 2 additions and 2 deletions
|
@ -9,10 +9,10 @@ if($colorScheme !== 'dark' && $colorScheme !== 'light' && $colorScheme !== 'auto
|
|||
|
||||
if($colorScheme == 'auto'){
|
||||
// Delete the cookie; auto is the default
|
||||
setcookie('color-scheme', null, ['expires' => 0, 'path' => '/', 'secure' => true, 'httponly' => true]);
|
||||
setcookie('color-scheme', null, 0, '/', '', true, true);
|
||||
}
|
||||
else{
|
||||
setcookie('color-scheme', $colorScheme, ['expires' => strtotime('+10 years'), 'path' => '/', 'secure' => true, 'httponly' => true]);
|
||||
setcookie('color-scheme', $colorScheme, strtotime('+10 years'), '/', '', true, true);
|
||||
}
|
||||
|
||||
// HTTP 303, See other
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue