mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #2068 from sminnee/cookie-fix
Ensure Cookie::get() will immediately return results.
This commit is contained in:
commit
59fb88bec7
@ -110,6 +110,7 @@ class Cookie {
|
||||
$expiry = $expiry > 0 ? time()+(86400*$expiry) : $expiry;
|
||||
$path = ($path) ? $path : Director::baseURL();
|
||||
setcookie($name, $value, $expiry, $path, $domain, $secure, $httpOnly);
|
||||
$_COOKIE[$name] = $value;
|
||||
} else {
|
||||
if(Config::inst()->get('Cookie', 'report_errors')) {
|
||||
user_error("Cookie '$name' can't be set. The site started outputting content at line $line in $file",
|
||||
|
Loading…
Reference in New Issue
Block a user