mirror of
https://github.com/alextselegidis/easyappointments.git
synced 2024-12-24 15:43:04 +03:00
Skip regenerate if session is not active
This commit is contained in:
parent
1f17ae6376
commit
af2e3a065f
1 changed files with 4 additions and 0 deletions
|
@ -693,6 +693,10 @@ class CI_Session {
|
||||||
*/
|
*/
|
||||||
public function sess_regenerate($destroy = null)
|
public function sess_regenerate($destroy = null)
|
||||||
{
|
{
|
||||||
|
if (@session_status() !== PHP_SESSION_ACTIVE) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$destroy = boolval($destroy !== null ? $destroy : config_item('sess_regenerate_destroy'));
|
$destroy = boolval($destroy !== null ? $destroy : config_item('sess_regenerate_destroy'));
|
||||||
$_SESSION['__ci_last_regenerate'] = time();
|
$_SESSION['__ci_last_regenerate'] = time();
|
||||||
@session_regenerate_id($destroy);
|
@session_regenerate_id($destroy);
|
||||||
|
|
Loading…
Reference in a new issue