Refactoring the cookie class.

This commit is contained in:
Taylor Otwell 2011-08-08 08:49:29 -05:00
parent 5e28cd08b4
commit bc51ec3d83
1 changed files with 1 additions and 4 deletions

View File

@ -56,10 +56,7 @@ public static function forever($name, $value, $path = '/', $domain = null, $secu
*/
public static function put($name, $value, $minutes = 0, $path = '/', $domain = null, $secure = false, $http_only = false)
{
if ($minutes < 0)
{
unset($_COOKIE[$name]);
}
if ($minutes < 0) unset($_COOKIE[$name]);
return setcookie($name, $value, ($minutes != 0) ? time() + ($minutes * 60) : 0, $path, $domain, $secure, $http_only);
}