Skip to content

Commit

Permalink
Fix incorrect expiry of sessions.
Browse files Browse the repository at this point in the history
Fixes #3088
  • Loading branch information
markstory committed Aug 3, 2012
1 parent cffc36e commit c96e364
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/Cake/Model/Datasource/Session/DatabaseSession.php
Expand Up @@ -137,6 +137,8 @@ public function destroy($id) {
public function gc($expires = null) {
if (!$expires) {
$expires = time();
} else {
$expires = time() - $expires;
}
return $this->_model->deleteAll(array($this->_model->alias . ".expires <" => $expires), false, false);
}
Expand Down

0 comments on commit c96e364

Please sign in to comment.