Fix session::sess_regenerate $delete_old_session always null

Fix bad transtyped bool
throw error on login
session_regenerate_id(): Passing null to parameter #1
($delete_old_session) of type bool is deprecated
This commit is contained in:
Thomas Ingles 2024-04-30 15:52:34 +02:00 committed by Alex Tselegidis
parent 97d9219484
commit 40cab55a02

View file

@ -693,7 +693,7 @@ class CI_Session {
*/ */
public function sess_regenerate($destroy = null) public function sess_regenerate($destroy = null)
{ {
$destroy = (bool) $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);
} }