Skip to content

Commit

Permalink
Set expiration to the past when deleting a cookie
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Welch committed Mar 8, 2016
1 parent bfc4230 commit be8667f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions services/Cookies_UtilsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public function set($name = "", $value = "", $expire = 0, $path = "", $domain =
{
$expire = (int) $expire;
/* -- Make sure the cookie expiry is in the past if we're deleting the cookie */
if (value=="")
if ($value=="")
$expire = (int)(time() - 3600);
setcookie($name, $value, $expire, $path, $domain, $secure, $httponly);
$_COOKIE[$name] = $value;
Expand All @@ -38,7 +38,7 @@ public function setSecure($name = "", $value = "", $expire = 0, $path = "", $dom
{
$expire = (int) $expire;
/* -- Make sure the cookie expiry is in the past if we're deleting the cookie */
if (value=="")
if ($value=="")
$expire = (int)(time() - 3600);
$cookie = new HttpCookie($name, '');

Expand Down

0 comments on commit be8667f

Please sign in to comment.