Fix errors in the router

This commit is contained in:
2017-09-04 11:02:25 +07:00
parent 128d337383
commit bfdd632adf
4 changed files with 21 additions and 8 deletions

View File

@@ -33,6 +33,7 @@ class Router
public function match($url)
{
$url = htmlspecialchars($url);
$url = substr_replace($url, '', 0, 1);
foreach ($this->routes as $route => $params) {
if (preg_match($route, $url, $matches)) {