fix bug in router::route method.

This commit is contained in:
Taylor Otwell 2012-02-12 15:39:53 -06:00
parent 597feed4a7
commit ae544b85da
1 changed files with 5 additions and 3 deletions

View File

@ -397,12 +397,14 @@ public static function route($method, $uri)
{
Bundle::start($bundle = Bundle::handles($uri));
$routes = (array) static::routes($method);
// Of course literal route matches are the quickest to find, so we will
// check for those first. If the destination key exists in teh routes
// check for those first. If the destination key exists in the routes
// array we can just return that route now.
if (array_key_exists($uri, static::$routes[$method]))
if (array_key_exists($uri, $routes))
{
$action = static::$routes[$method][$uri];
$action = $routes[$uri];
return new Route($method, $uri, $action);
}