Fix error on undefined param.

This commit is contained in:
kj 2021-10-15 17:41:47 -04:00
parent e1fe93a04c
commit 184d03a214

View File

@ -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]);
}
}
?>