From 75438d3b6c46f9566ff7f6a9657dda7cdfbf9a6d Mon Sep 17 00:00:00 2001
From: filippo.bertilotti <filippobertilotti@gmail.com>
Date: Wed, 15 May 2024 09:36:01 +0200
Subject: [PATCH] questo permette alla classe database di crearsi solamente nelle pagine in cui รจ richiesta (parte 90)

---
 src/Framework/router.php |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/Framework/router.php b/src/Framework/router.php
index 9b8b66e..63596c4 100644
--- a/src/Framework/router.php
+++ b/src/Framework/router.php
@@ -12,8 +12,9 @@
 
 
     }
-    public function match (string $path,): array|bool {
-
+    public function match (string $path): array|bool {
+        $path = urldecode($path);
+        
         $path = trim($path, "/");   
 
         foreach ($this->routes as $route) {
@@ -48,6 +49,6 @@
             return $segment;
         }, $segments);
 
-        return "#^" . implode("/", $segments) . "$#i";
+        return "#^" . implode("/", $segments) . "$#iu";
     }
 }
\ No newline at end of file

--
Gitblit v1.8.0