Remove any unspecified optional parameters from URIs created from routes.

This commit is contained in:
Taylor Otwell 2011-08-15 10:42:57 -05:00
parent 23e100aa80
commit a414bbfccb
1 changed files with 2 additions and 0 deletions

View File

@ -79,6 +79,8 @@ public static function to_route($name, $parameters = array(), $https = false)
$uri = preg_replace('/\(.+?\)/', $parameter, $uri, 1);
}
$uri = str_replace(array('/(:any?)', '/(:num?)'), '', $uri);
return static::to($uri, $https);
}