diff --git a/boot.php b/boot.php index 00058727f5..0dd8e03f25 100644 --- a/boot.php +++ b/boot.php @@ -928,14 +928,8 @@ function login($register = false, $hiddens = false) */ function killme() { - global $session_exists; - if (!get_app()->is_backend()) { - if (!$session_exists) { - session_abort(); - } else { - session_write_close(); - } + session_write_close(); } exit(); diff --git a/include/session.php b/include/session.php index 54c17e3754..66df498fe0 100644 --- a/include/session.php +++ b/include/session.php @@ -61,10 +61,14 @@ function ref_session_write($id, $data) { global $session_exists, $session_expire; - if (!$id || !$data) { + if (!$id) { return false; } + if (!$data) { + return true; + } + $expire = time() + $session_expire; $default_expire = time() + 300;