made router routes optional and fixed front controller.

This commit is contained in:
Taylor Otwell
2011-07-31 17:40:03 -05:00
parent 3f6aa54487
commit 344f49e1bf
2 changed files with 4 additions and 5 deletions

View File

@@ -145,9 +145,7 @@ $response = System\Routing\Filter::call('before', array(), true);
// ----------------------------------------------------------
if (is_null($response))
{
list($method, $uri) = array(System\Request::method(), System\Request::uri());
$route = System\Routing\Router::make($method, $uri, System\Routing\Loader::load($uri))->route();
$route = System\Routing\Router::make(Request::method(), Request::uri())->route();
$response = (is_null($route)) ? System\Response::make(System\View::make('error/404'), 404) : $route->call();
}