We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eea5d03 commit a4868a6Copy full SHA for a4868a6
src/UrlBuilder.php
@@ -43,7 +43,7 @@ public function __construct($url)
43
public function build($absolute = true)
44
{
45
$host = $absolute ? $this->get('scheme') . '://' . $this->get('host') . (($port = $this->get('port')) ? ":{$port}": '') : '';
46
- $path = '/' . trim($this->get('path'), '/');
+ $path = rtrim('/' . ltrim($this->get('path'), '/'), '/');
47
$query = $this->get('query') ? '?' . $this->get('query') : '';
48
49
return $host . $path . $query;
0 commit comments