diff options
author | robocoder <anthon.pang@gmail.com> | 2009-06-17 23:35:50 +0400 |
---|---|---|
committer | robocoder <anthon.pang@gmail.com> | 2009-06-17 23:35:50 +0400 |
commit | e39ae666c1f516251be99929ee6b2e256605a501 (patch) | |
tree | 2f633a31dbe899c1fcb9e4880d7063127b3c0f72 /core/Cookie.php | |
parent | dbc0a736aff0b8a9b00300e4cf779ca40b464617 (diff) |
fixes #736 - feature request to unset cookie value via set(name, null)
git-svn-id: http://dev.piwik.org/svn/trunk@1238 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'core/Cookie.php')
-rw-r--r-- | core/Cookie.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/core/Cookie.php b/core/Cookie.php index 956e402313..c1223de083 100644 --- a/core/Cookie.php +++ b/core/Cookie.php @@ -220,7 +220,14 @@ class Piwik_Cookie public function set( $name, $value ) { $name = self::escapeValue($name); - $this->value[$name] = $value; + if(is_null($value)) + { + unset($this->value[$name]); + } + else + { + $this->value[$name] = $value; + } } /** |