Fix incorrect expiry of sessions.

Fixes #3088
This commit is contained in:
mark_story 2012-08-02 21:03:53 -04:00
parent cffc36e4e0
commit c96e364cbb

View file

@ -137,6 +137,8 @@ class DatabaseSession implements CakeSessionHandlerInterface {
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);
}