fixed bug in route finder when looking for routes in route directory.

This commit is contained in:
Taylor Otwell 2011-07-16 13:48:38 -05:00
parent 7d50f5f96d
commit 55a201ac61
1 changed files with 6 additions and 1 deletions

View File

@ -29,7 +29,12 @@ public static function find($name)
// to all of the routes, not just the ones applicable to the request URI.
if (is_null(static::$routes))
{
static::$routes = (is_dir(APP_PATH.'routes')) ? static::load() : require APP_PATH.'routes'.EXT;
static::$routes = require APP_PATH.'routes'.EXT;
if (is_dir(APP_PATH.'routes'))
{
static::$routes = array_merge(static::load(), static::$routes);
}
}
if (array_key_exists($name, static::$names))