From 8ca0a1cca99669b1c924dc5daa1a581a3c3206a8 Mon Sep 17 00:00:00 2001 From: Cambell Prince Date: Fri, 9 Jan 2015 19:53:09 +0100 Subject: [PATCH 1/1] Small cleanup in JsHttpRequest. --- includes/JsHttpRequest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/JsHttpRequest.php b/includes/JsHttpRequest.php index 1ef9a815..78b0b2ce 100644 --- a/includes/JsHttpRequest.php +++ b/includes/JsHttpRequest.php @@ -71,7 +71,7 @@ class JsHttpRequest $GLOBALS['_RESULT'] =& $this->RESULT; // Parse QUERY_STRING. - if (preg_match('/^(.*)(?:&|^)JsHttpRequest=(?:(\d+)-)?([^&]+)((?:&|$).*)$/s', @$_SERVER['QUERY_STRING'], $m)) { + if (array_key_exists('QUERY_STRING', $_SERVER) && preg_match('/^(.*)(?:&|^)JsHttpRequest=(?:(\d+)-)?([^&]+)((?:&|$).*)$/s', @$_SERVER['QUERY_STRING'], $m)) { $this->ID = $m[2]; $this->LOADER = strtolower($m[3]); $_SERVER['QUERY_STRING'] = preg_replace('/^&+|&+$/s', '', preg_replace('/(^|&)'.session_name().'=[^&]*&?/s', '&', $m[1] . $m[4])); -- 2.30.2