From 732fc2a9b6341da9565b453b1cde3a2ae1f827bc Mon Sep 17 00:00:00 2001 From: AMoktar Date: Sun, 3 Dec 2023 09:11:32 +0200 Subject: [PATCH] Fix ActiveChecker: use fullUrl for comparison --- src/Menu/ActiveChecker.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/Menu/ActiveChecker.php b/src/Menu/ActiveChecker.php index baa35c3d..f67415be 100644 --- a/src/Menu/ActiveChecker.php +++ b/src/Menu/ActiveChecker.php @@ -131,16 +131,10 @@ protected function checkPattern($pattern) return (bool) preg_match($regex, $this->request->path()); } - // If pattern is not a regex, check if the requested url matches the - // absolute path to the given pattern. When the pattern uses query - // parameters, compare with the full url request. + // If pattern is not a regex, check if the requested url matches the full url request. $pattern = preg_replace('@^https?://@', '*', $this->url->to($pattern)); - $request = $this->request->url(); - - if (isset(parse_url($pattern)['query'])) { - $request = $this->request->fullUrl(); - } + $request = $this->request->fullUrl(); return Str::is(trim($pattern), trim($request)); }