Fix error on undefined param.
This commit is contained in:
parent
e1fe93a04c
commit
184d03a214
@ -261,10 +261,11 @@ class Router {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$args = static::getReq();
|
||||||
|
|
||||||
foreach ($routers as $router) { // revisa todos los routers para ver si coinciden con la URI actual
|
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)) {
|
if (preg_match_all('/^'.$router['path'].'\/?$/si',$uri, $matches, PREG_PATTERN_ORDER)) {
|
||||||
unset($matches[0]);
|
unset($matches[0]);
|
||||||
$args = static::getReq();
|
|
||||||
|
|
||||||
// Comprobando pseudo variables en URI
|
// Comprobando pseudo variables en URI
|
||||||
if (isset($matches[1])) {
|
if (isset($matches[1])) {
|
||||||
@ -292,7 +293,7 @@ class Router {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Si no hay router que coincida llamamos a $notFoundCallBack
|
// Si no hay router que coincida llamamos a $notFoundCallBack
|
||||||
call_user_func_array(static::$notFoundCallBack, [$req]);
|
call_user_func_array(static::$notFoundCallBack, [$args]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user