Commit 5b389595 authored by Steven Ayers's avatar Steven Ayers
Browse files

Issue #3243358: Error when using module and PHP 8.0

parent 6b732fb8
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -108,8 +108,10 @@ class KernelTerminateSubscriber implements EventSubscriberInterface {
   *   Full path.
   */
  protected function _getUrl() {
    return
      urldecode(sprintf('http://%s%s', $_SERVER['HTTP_HOST'], $this->request->getRequestUri()));
    $host = array_key_exists('HTTP_HOST', $_SERVER) ? $_SERVER['HTTP_HOST'] : '';
    $uri = $this->request->getRequestUri();

    return urldecode(sprintf('http://%s%s', $host, $uri));
  }

  /**