Skip to content

Commit

Permalink
Merge pull request #57 from mokotiyo/hotfix/php7
Browse files Browse the repository at this point in the history
セッション setGcMaxLifeTimeをstartの前に移動
  • Loading branch information
koriym authored Sep 20, 2018
2 parents 4f6d440 + d807013 commit 2607063
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions BEAR/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,11 @@ private function _start()
$hasStarted = true;
$this->_setAdapter($this->_config);

// GCが働くまでの時間
if (isset($this->_config['gc_max_lifetime']) && $this->_config['gc_max_lifetime']) {
HTTP_Session2::setGcMaxLifeTime($this->_config['gc_max_lifetime']);
}

// セッションスタート
$this->_httpSession2Start();

Expand Down Expand Up @@ -214,10 +219,7 @@ private function _start()
}
}
}
// GCが働くまでの時間
if (isset($this->_config['gc_max_lifetime']) && $this->_config['gc_max_lifetime']) {
HTTP_Session2::setGcMaxLifeTime($this->_config['gc_max_lifetime']);
}

// セッションスタート
$this->_log->log(
'Session Start',
Expand Down

0 comments on commit 2607063

Please sign in to comment.