From 559196be54e553ea461ffb8f3f744b3ee9e9f0ef Mon Sep 17 00:00:00 2001 From: Skylear Date: Thu, 15 Jul 2021 17:26:28 -0500 Subject: [PATCH] =?UTF-8?q?=E2=8F=B1=EF=B8=8F=20Replace=20preg=5Freplace?= =?UTF-8?q?=20in=20tokenize=20with=20str=5Freplace?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Splashsky/Router.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Splashsky/Router.php b/src/Splashsky/Router.php index 1ec3aff..b9d1177 100644 --- a/src/Splashsky/Router.php +++ b/src/Splashsky/Router.php @@ -131,12 +131,12 @@ class Router $matches = $matches[1]; foreach ($matches as $match) { - $pattern = "/(?:{".$match."})+/"; + $pattern = '{'.$match.'}'; if (in_array($match, $constraints)) { - $uri = preg_replace($pattern, '('.self::$constraints[$match].')', $uri); + $uri = str_replace($pattern, '('.self::$constraints[$match].')', $uri); } else { - $uri = preg_replace($pattern, self::$defaultConstraint, $uri); + $uri = str_replace($pattern, self::$defaultConstraint, $uri); } }