diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php index 8e37b2d9..25a41720 100644 --- a/system/libraries/Session/Session.php +++ b/system/libraries/Session/Session.php @@ -693,7 +693,7 @@ class CI_Session { */ 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); }