Skip to content

Commit

Permalink
🐞 Fix URL construction in Router module for URLs with ports + fragments
Browse files Browse the repository at this point in the history
  • Loading branch information
neoground committed Aug 21, 2024
1 parent 47632a0 commit 429e33b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

- Garbage collector config options, improve default garbage collection in session module

### 🐞 Fixed

- Fix URL construction in Router module for URLs with ports + fragments

---

## [3.5] - 18 August 2024
Expand Down
4 changes: 2 additions & 2 deletions src/Vivid/Router/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -471,10 +471,10 @@ public function constructUrl(string $url, array $params): string
return (isset($urlComponents['scheme']) ? $urlComponents['scheme'] . '://' : '')
. (isset($urlComponents['user']) ? $urlComponents['user'] . (isset($urlComponents['pass']) ? ':' . $urlComponents['pass'] : '') . '@' : '')
. ($urlComponents['host'] ?? '')
. ($urlComponents['port'] ?? '')
. (isset($urlComponents['port']) ? ':' . $urlComponents['port'] : '')
. ($urlComponents['path'] ?? '')
. '?' . $urlComponents['query']
. ($urlComponents['fragment'] ?? '');
. (isset($urlComponents['fragment']) ? '#' . $urlComponents['fragment'] : '');
}

}

0 comments on commit 429e33b

Please sign in to comment.