Skip to content

Commit

Permalink
Fix session::sess_regenerate $delete_old_session always null
Browse files Browse the repository at this point in the history
Fix bad transtyped bool
throw error on login
session_regenerate_id(): Passing null to parameter #1
($delete_old_session) of type bool is deprecated
  • Loading branch information
sudwebdesign authored and alextselegidis committed May 11, 2024
1 parent 97d9219 commit 40cab55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion system/libraries/Session/Session.php
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ public function sess_destroy()
*/
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_regenerate_id($destroy);
}
Expand Down

0 comments on commit 40cab55

Please sign in to comment.