mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #2127 from silverstripe-rebelalliance/cookietimestamp
BUG: Fix for Cookie expiry timeout being passed as a large number on 64 ...
This commit is contained in:
commit
09ca497b36
@ -523,9 +523,11 @@ class Session {
|
||||
|
||||
if(!session_id() && !headers_sent()) {
|
||||
if($domain) {
|
||||
session_set_cookie_params($timeout, $path, $domain, $secure /* secure */, true /* httponly */);
|
||||
session_set_cookie_params($timeout, $path, $domain,
|
||||
$secure /* secure */, true /* httponly */);
|
||||
} else {
|
||||
session_set_cookie_params($timeout, $path, null, $secure /* secure */, true /* httponly */);
|
||||
session_set_cookie_params($timeout, $path, null,
|
||||
$secure /* secure */, true /* httponly */);
|
||||
}
|
||||
|
||||
// Allow storing the session in a non standard location
|
||||
@ -541,7 +543,8 @@ class Session {
|
||||
// Modify the timeout behaviour so it's the *inactive* time before the session expires.
|
||||
// By default it's the total session lifetime
|
||||
if($timeout && !headers_sent()) {
|
||||
Cookie::set(session_name(), session_id(), time()+$timeout, $path, $domain ? $domain : null, $secure, true);
|
||||
Cookie::set(session_name(), session_id(), $timeout/86400, $path, $domain ? $domain
|
||||
: null, $secure, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user