]> git.mxchange.org Git - friendica.git/commitdiff
Only close the session if it had been opened.
authorMichael Vogel <icarus@dabo.de>
Tue, 16 Aug 2016 19:35:12 +0000 (21:35 +0200)
committerMichael Vogel <icarus@dabo.de>
Tue, 16 Aug 2016 19:35:12 +0000 (21:35 +0200)
boot.php
index.php
mod/hostxrd.php

index 208293a925050adfd8213fb06732bfb1fa9aa745..ecaa73e6a3fe8cba02d6635990f420009c35ab5f 100644 (file)
--- a/boot.php
+++ b/boot.php
@@ -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;
 }
 
index 6ce348eac5d57692881c47e11f1d913df9567b40..13c3f6318f815fd4923926836af04bca8abb8120 100644 (file)
--- a/index.php
+++ b/index.php
@@ -489,7 +489,8 @@ if (isset($_GET["mode"]) AND ($_GET["mode"] == "raw")) {
 
        echo substr($target->saveHTML(), 6, -8);
 
-       session_write_close();
+       if (!$a->is_backend())
+               session_write_close();
        exit;
 
 }
@@ -514,5 +515,6 @@ if(!$template) {
 
 require_once($template);
 
-session_write_close();
+if (!$a->is_backend())
+       session_write_close();
 exit;
index 4121764f1a526b340fc1c4805aa705a0a8a0f97a..647073b056e3774b1431ab98208ac5c486283275 100644 (file)
@@ -25,7 +25,6 @@ function hostxrd_init(&$a) {
                '$zot_post' => z_root() . '/post',
                '$bigkey' => salmon_key(get_config('system','site_pubkey')),
        ));
-       session_write_close();
        exit();
 
 }