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
parent 2cce9a8bba
commit 8e415fcf10
No known key found for this signature in database
GPG key ID: 02A5671B95EAD354

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);
} }