Commit 19339650 authored by Taylor Otwell's avatar Taylor Otwell

Fix bug in cookie class.

parent 374f72f5
......@@ -88,6 +88,10 @@ class Cookie {
{
if (headers_sent()) return false;
$time = ($minutes !== 0) ? time() + ($minutes * 60) : 0;
$value = static::hash($name, $value).'~'.$value;
if ($minutes < 0)
{
unset($_COOKIE[$name]);
......@@ -97,10 +101,6 @@ class Cookie {
$_COOKIE[$name] = $value;
}
$time = ($minutes !== 0) ? time() + ($minutes * 60) : 0;
$value = static::hash($name, $value).'~'.$value;
return setcookie($name, $value, $time, $path, $domain, $secure, $http_only);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment