fix 404 route issue.
This commit is contained in:
parent
97fb28bd00
commit
d681f49920
|
@ -161,15 +161,18 @@
|
|||
|
||||
Request::$route = Routing\Router::route(Request::method(), URI::current());
|
||||
|
||||
if ( ! is_null(Request::$route))
|
||||
{
|
||||
$response = Request::$route->call();
|
||||
}
|
||||
else
|
||||
if (is_null(Request::$route))
|
||||
{
|
||||
Request::$route = new Routing\Route('GET /404', array(function()
|
||||
{
|
||||
return Response::error('404');
|
||||
}));
|
||||
|
||||
$response = Response::error('404');
|
||||
}
|
||||
|
||||
$response = Request::$route->call();
|
||||
|
||||
/**
|
||||
* Close the session and write the active payload to persistent
|
||||
* storage. The session cookie will also be written and if the
|
||||
|
|
Loading…
Reference in New Issue