diff --git a/Uri/Http.php b/Uri/Http.php index 6dfbc0dce..c410ecbe4 100644 --- a/Uri/Http.php +++ b/Uri/Http.php @@ -297,7 +297,7 @@ class Http implements UriInterface */ public function getPathElement(int $pos = null) : string { - return explode('/', $this->path)[$pos]; + return explode('/', $this->path)[$pos] ?? ''; } /**