8000 Current time added twice in method deleteCookies() · Issue #9 · matomo-org/matomo-php-tracker · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Current time added twice in method deleteCookies() #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
julienmoumne opened this issue May 3, 2015 · 0 comments · Fixed by #17
Closed

Current time added twice in method deleteCookies() #9

julienmoumne opened this issue May 3, 2015 · 0 comments · Fixed by #17
Assignees

Comments

@julienmoumne
Copy link
Collaborator

$this->currentTs is added twice upon calling method deleteCookies()

Once at line 3 in

  public function deleteCookies()
  {
    $expire = $this->currentTs - 86400;
    $cookies = array('id', 'ses', 'cvar', 'ref');
    foreach($cookies as $cookie) {
      $this->setCookie($cookie, '', $expire);
    }
  }

and once at line 3 in

  protected function setCookie($cookieName, $cookieValue, $cookieTTL)
  {
    $cookieExpire = $this->currentTs + $cookieTTL;
    if(!headers_sent()) {
    setcookie($this->getCookieName($cookieName), $cookieValue, $cookieExpire, $this->configCookiePath, $this->configCookieDomain);
    }
  }

This results in cookies having expiration dates set to year 2060.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants
0