diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php index 15186134..37b7ed4f 100644 --- a/system/libraries/Session/Session.php +++ b/system/libraries/Session/Session.php @@ -693,6 +693,10 @@ class CI_Session { */ public function sess_regenerate($destroy = null) { + if (@session_status() !== PHP_SESSION_ACTIVE) { + return; + } + $destroy = boolval($destroy !== null ? $destroy : config_item('sess_regenerate_destroy')); $_SESSION['__ci_last_regenerate'] = time(); @session_regenerate_id($destroy);