diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-10-24 08:34:35 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-10-24 08:34:35 +0400 |
commit | 6e78c7bcb16929ab1f9ee0cbfc6b3dbcf4ed0404 (patch) | |
tree | cfbf0134ee44e66312f1d28ea248ee93f05e673a /libs | |
parent | 3826fda65c96455fbe3abd9cc082caa6fed42774 (diff) |
next try
Diffstat (limited to 'libs')
-rw-r--r-- | libs/PiwikTracker/PiwikTracker.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/PiwikTracker/PiwikTracker.php b/libs/PiwikTracker/PiwikTracker.php index bb4324afa0..99ff7143d9 100644 --- a/libs/PiwikTracker/PiwikTracker.php +++ b/libs/PiwikTracker/PiwikTracker.php @@ -1345,7 +1345,9 @@ class PiwikTracker protected function setCookie($cookieName, $cookieValue, $cookieTTL) { $cookieExpire = $this->createTs + $cookieTTL; - setrawcookie($this->getCookieName($cookieName), $cookieValue, $cookieExpire, $this->configCookiePath, $this->configCookieDomain); + if(!headers_sent()) { + setrawcookie($this->getCookieName($cookieName), $cookieValue, $cookieExpire, $this->configCookiePath, $this->configCookieDomain); + } } /** |