|
|
@ -123,7 +123,7 @@ class UrlInfo {
|
|
|
|
$url .= ':' . $this->getPort();
|
|
|
|
$url .= ':' . $this->getPort();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ($this->hasPath()) {
|
|
|
|
if ($this->hasPath()) {
|
|
|
|
$url .= ($url === '' || !$this->isPathAbsolute() ? '' : '/') . $this->getPath();
|
|
|
|
$url .= ($this->hasHost() && !$this->isPathAbsolute() ? '/' : '') . $this->getPath();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ($this->hasArguments()) {
|
|
|
|
if ($this->hasArguments()) {
|
|
|
|
$url .= '?' . $this->getArgumentsAsString();
|
|
|
|
$url .= '?' . $this->getArgumentsAsString();
|
|
|
@ -304,7 +304,7 @@ class UrlInfo {
|
|
|
|
* @return string|null The URL path
|
|
|
|
* @return string|null The URL path
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
public function getPath (): ?string {
|
|
|
|
public function getPath (): ?string {
|
|
|
|
return $this->hasPathParts() ? $this->getPathParts()->join('/') : null;
|
|
|
|
return $this->hasPathParts() ? preg_replace('#/{2,}#', '/', $this->getPathParts()->join('/')) : null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* The URL path parts
|
|
|
|
* The URL path parts
|
|
|
|