X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Futil.php;h=a061d17739356cc0bc9643a39bec2106513b7efb;hb=ab053fe2ca8bb2be76d6af0d313f38d89540d768;hp=99be56daeb3981a211abf683411975cf0a36e00b;hpb=8c710ad2c1b80544acccb515f7b601aadff2de16;p=quix0rs-gnu-social.git diff --git a/lib/util.php b/lib/util.php index 99be56daeb..a061d17739 100644 --- a/lib/util.php +++ b/lib/util.php @@ -1307,11 +1307,11 @@ function common_inject_session($url, $serverpart = null) { if (common_have_session()) { - if (empty($serverpart)) { - $serverpart = parse_url($url, PHP_URL_HOST); - } + if (empty($serverpart)) { + $serverpart = parse_url($url, PHP_URL_HOST); + } - $currentServer = $_SERVER['HTTP_HOST']; + $currentServer = (array_key_exists('HTTP_HOST', $_SERVER)) ? $_SERVER['HTTP_HOST'] : null; // Are we pointing to another server (like an SSL server?)