diff --git a/src/Stackify/Log/Entities/Api/WebRequestDetail.php b/src/Stackify/Log/Entities/Api/WebRequestDetail.php index d47ae93..35ff263 100644 --- a/src/Stackify/Log/Entities/Api/WebRequestDetail.php +++ b/src/Stackify/Log/Entities/Api/WebRequestDetail.php @@ -329,7 +329,14 @@ protected function getRequestUrl() $https = filter_input(INPUT_SERVER, 'HTTPS'); $ssl = null !== $https && 'off' !== $https; $protocol = $ssl ? 'https' : 'http'; - list($url,) = explode('?', filter_input(INPUT_SERVER, 'REQUEST_URI')); + $inputServerValue = filter_input(INPUT_SERVER, 'REQUEST_URI'); + if (is_null($inputServerValue)) { + $url = ''; + } + else { + list($url,) = explode('?', $inputServerValue); + } + $serverName = filter_input(INPUT_SERVER, 'SERVER_NAME'); if ($serverName && $url) { return "$protocol://$serverName" . $url; @@ -359,4 +366,4 @@ protected function getHeaders($blacklist = null, $whitelist = null) return self::getRequestMap($headers, $blacklist, $whitelist); } -} \ No newline at end of file +}