From f1c338853f1c7b59083226c94021b7f0235f4a72 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Wed, 7 Feb 2018 14:50:36 +0100 Subject: [PATCH] fix: router.core.router (now manages URI with beginning slash '/' (removes it)) --- build/router/core/Router.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build/router/core/Router.php b/build/router/core/Router.php index ee62743..c4b0d42 100755 --- a/build/router/core/Router.php +++ b/build/router/core/Router.php @@ -18,6 +18,10 @@ class Router{ * */ public function __construct($url){ + // Format URI (ne doit pas avoir le premier '/') + if( preg_match("@^/@", $url) ) + $url = substr($url, 1); + $this->url = $url; // On initialise les routes