Only close the session if it had been opened.

This commit is contained in:
Michael Vogel
2016-08-16 21:35:12 +02:00
parent 789e9577c6
commit 1bfdc216d0
3 changed files with 7 additions and 4 deletions
+3 -1
View File
@@ -1698,7 +1698,9 @@ function login($register = false, $hiddens=false) {
* @brief Used to end the current process, after saving session state.
*/
function killme() {
session_write_close();
if (!get_app()->is_backend())
session_write_close();
exit;
}