fix replacement of optional parameters in the URL::transpose method.

This commit is contained in:
Taylor Otwell
2012-03-28 13:58:02 -05:00
parent 6bf68aad38
commit 023dacf5e0
2 changed files with 14 additions and 2 deletions

View File

@@ -304,8 +304,8 @@ class URL {
// If there are any remaining optional place-holders, we'll just replace
// them with empty strings since not every optional parameter has to be
// in the array of parameters that were passed.
$uri = str_replace(array_keys(Router::$optional), '', $uri);
// in the array of parameters that were passed to us.
$uri = preg_replace('/\(.+?\)/', '', $uri);
return trim($uri, '/');
}