diff --git a/changes.md b/changes.md index 4f638ad5..f15838f9 100644 --- a/changes.md +++ b/changes.md @@ -2,11 +2,23 @@ ## Contents +- [Laravel 3.2](#3.2) +- [Upgrading From 3.1](#upgrade-3.2) - [Laravel 3.1.1](#3.1.1) - [Upgrading From 3.1](#upgrade-3.1.1) - [Laravel 3.1](#3.1) - [Upgrading From 3.0](#upgrade-3.1) + +## Laravel 3.2 + +- Fixed replacement of optional parameters in URL::transpose method. + + +## Upgrading From 3.1 + +- Replace the **laravel** folder. + ## Laravel 3.1.1 diff --git a/laravel/url.php b/laravel/url.php index 4057e4e9..9268a0d5 100644 --- a/laravel/url.php +++ b/laravel/url.php @@ -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, '/'); }