diff --git a/Localization/Localization.php b/Localization/Localization.php index fdc8eb585..8c0c9bfaa 100644 --- a/Localization/Localization.php +++ b/Localization/Localization.php @@ -224,6 +224,8 @@ class Localization * * @return void * + * @throws InvalidEnumValue + * * @since 1.0.0 * @author Dennis Eichhorn */ diff --git a/Uri/Http.php b/Uri/Http.php index 8d0c9b6cf..7c9bf561e 100644 --- a/Uri/Http.php +++ b/Uri/Http.php @@ -155,7 +155,7 @@ class Http implements UriInterface $this->port = $url['port'] ?? null; $this->user = $url['user'] ?? null; $this->pass = $url['pass'] ?? null; - $this->path = $url['path'] ?? null; + $this->path = $url['path'] ?? ''; if (StringUtils::endsWith($this->path, '.php')) { $this->path = substr($this->path, 0, -4); @@ -183,7 +183,7 @@ class Http implements UriInterface public static function getCurrent() : string { /** @noinspection PhpUndefinedConstantInspection */ - return 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; + return 'http://' . ($_SERVER['HTTP_HOST'] ?? '') . ($_SERVER['REQUEST_URI'] ?? ''); } /**