diff --git a/src/Libs/Router.php b/src/Libs/Router.php index 981a9e3..20ee6de 100644 --- a/src/Libs/Router.php +++ b/src/Libs/Router.php @@ -261,10 +261,11 @@ class Router { break; } + $args = static::getReq(); + foreach ($routers as $router) { // revisa todos los routers para ver si coinciden con la URI actual if (preg_match_all('/^'.$router['path'].'\/?$/si',$uri, $matches, PREG_PATTERN_ORDER)) { unset($matches[0]); - $args = static::getReq(); // Comprobando pseudo variables en URI if (isset($matches[1])) { @@ -292,7 +293,7 @@ class Router { } // Si no hay router que coincida llamamos a $notFoundCallBack - call_user_func_array(static::$notFoundCallBack, [$req]); + call_user_func_array(static::$notFoundCallBack, [$args]); } } ?>