fix replacement of optional parameters in the URL::transpose method.
This commit is contained in:
12
changes.md
12
changes.md
@@ -2,11 +2,23 @@
|
|||||||
|
|
||||||
## Contents
|
## Contents
|
||||||
|
|
||||||
|
- [Laravel 3.2](#3.2)
|
||||||
|
- [Upgrading From 3.1](#upgrade-3.2)
|
||||||
- [Laravel 3.1.1](#3.1.1)
|
- [Laravel 3.1.1](#3.1.1)
|
||||||
- [Upgrading From 3.1](#upgrade-3.1.1)
|
- [Upgrading From 3.1](#upgrade-3.1.1)
|
||||||
- [Laravel 3.1](#3.1)
|
- [Laravel 3.1](#3.1)
|
||||||
- [Upgrading From 3.0](#upgrade-3.1)
|
- [Upgrading From 3.0](#upgrade-3.1)
|
||||||
|
|
||||||
|
<a name="3.2"></a>
|
||||||
|
## Laravel 3.2
|
||||||
|
|
||||||
|
- Fixed replacement of optional parameters in URL::transpose method.
|
||||||
|
|
||||||
|
<a name="upgrade-3.2"></a>
|
||||||
|
## Upgrading From 3.1
|
||||||
|
|
||||||
|
- Replace the **laravel** folder.
|
||||||
|
|
||||||
<a name="3.1.1"></a>
|
<a name="3.1.1"></a>
|
||||||
## Laravel 3.1.1
|
## Laravel 3.1.1
|
||||||
|
|
||||||
|
|||||||
@@ -304,8 +304,8 @@ class URL {
|
|||||||
|
|
||||||
// If there are any remaining optional place-holders, we'll just replace
|
// If there are any remaining optional place-holders, we'll just replace
|
||||||
// them with empty strings since not every optional parameter has to be
|
// them with empty strings since not every optional parameter has to be
|
||||||
// in the array of parameters that were passed.
|
// in the array of parameters that were passed to us.
|
||||||
$uri = str_replace(array_keys(Router::$optional), '', $uri);
|
$uri = preg_replace('/\(.+?\)/', '', $uri);
|
||||||
|
|
||||||
return trim($uri, '/');
|
return trim($uri, '/');
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user