From 65c1a9fcc0499cb5479eddc5e2bc9a4f141f62df Mon Sep 17 00:00:00 2001 From: Scott Wichser Date: Sun, 30 Jul 2023 07:14:51 -0500 Subject: [PATCH] Remove redundant prepending of the base path. Fixes #199. --- src/TwigRuntimeExtension.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/TwigRuntimeExtension.php b/src/TwigRuntimeExtension.php index 13926c8..4d9859d 100644 --- a/src/TwigRuntimeExtension.php +++ b/src/TwigRuntimeExtension.php @@ -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; @@ -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)) {