From ae544b85da996318c4ab724a07bb537982619829 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Sun, 12 Feb 2012 15:39:53 -0600 Subject: [PATCH] fix bug in router::route method. --- laravel/routing/router.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/laravel/routing/router.php b/laravel/routing/router.php index 5908433a..0c643085 100644 --- a/laravel/routing/router.php +++ b/laravel/routing/router.php @@ -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); }