Skip to content

Commit

Permalink
Remove redundant prepending of the base path. Fixes slimphp#199.
Browse files Browse the repository at this point in the history
  • Loading branch information
blast007 committed Jul 30, 2023
1 parent d1b88bf commit 22451ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/TwigRuntimeExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function fullUrlFor(string $routeName, array $data = [], array $queryPara
*/
public function isCurrentUrl(string $routeName, array $data = []): bool
{
$currentUrl = $this->basePath . $this->uri->getPath();
$currentUrl = $this->uri->getPath();
$result = $this->routeParser->urlFor($routeName, $data);

return $result === $currentUrl;
Expand All @@ -84,7 +84,7 @@ public function isCurrentUrl(string $routeName, array $data = []): bool
*/
public function getCurrentUrl(bool $withQueryString = false): string
{
$currentUrl = $this->basePath . $this->uri->getPath();
$currentUrl = $this->uri->getPath();
$query = $this->uri->getQuery();

if ($withQueryString && !empty($query)) {
Expand Down

0 comments on commit 22451ca

Please sign in to comment.