Skip to content

Commit

Permalink
Default domain to /
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Welch committed Mar 8, 2016
1 parent be8667f commit a0a3c6e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ They all act as a wrapper for the PHP `setcookie` function:

More info: (http://php.net/manual/en/function.setcookie.php)

All of the parameters except for `NAME` are optional.
All of the parameters except for `NAME` are optional. The `DOMAIN` defaults to `/`

**Examples**

Expand Down
4 changes: 2 additions & 2 deletions services/Cookies_UtilsService.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Cookies_UtilsService extends BaseApplicationComponent
Standard cookies
-------------------------------------------------------------------------------- */

public function set($name = "", $value = "", $expire = 0, $path = "", $domain = "", $secure = false, $httponly = false)
public function set($name = "", $value = "", $expire = 0, $path = "", $domain = "/", $secure = false, $httponly = false)
{
$expire = (int) $expire;
/* -- Make sure the cookie expiry is in the past if we're deleting the cookie */
Expand All @@ -28,7 +28,7 @@ public function get($name = "")
Security validated cookies
-------------------------------------------------------------------------------- */

public function setSecure($name = "", $value = "", $expire = 0, $path = "", $domain = "", $secure = false, $httponly = false)
public function setSecure($name = "", $value = "", $expire = 0, $path = "", $domain = "/", $secure = false, $httponly = false)
{
if ($name == "")
{
Expand Down

0 comments on commit a0a3c6e

Please sign in to comment.