mirror of
https://github.com/getgrav/grav.git
synced 2026-07-12 07:33:28 +02:00
Fixed a bug in Route::withParam() method
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
1. [](#bugfix)
|
||||
* Fixed error in `ImageMedium::url()` if the image cache folder does not exist
|
||||
* Fixed empty form flash name after update
|
||||
* Fixed a bug in `Route::withParam()` method
|
||||
|
||||
# v1.6.10
|
||||
## 06/14/2019
|
||||
|
||||
@@ -313,9 +313,9 @@ class Route
|
||||
*/
|
||||
protected function withParam($type, $param, $value)
|
||||
{
|
||||
$oldValue = $this->{$type}[$param] ?? null;
|
||||
$typeValue = $this->{$type}[$param] ?? null;
|
||||
|
||||
if ($oldValue === $value) {
|
||||
if ($typeValue === $value) {
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -323,7 +323,8 @@ class Route
|
||||
if ($value === null) {
|
||||
unset($new->{$type}[$param]);
|
||||
} else {
|
||||
$new->{$type}[$param] = $value;
|
||||
$typeValue[$param] = $value;
|
||||
$new->{$type} = $typeValue;
|
||||
}
|
||||
|
||||
return $new;
|
||||
|
||||
Reference in New Issue
Block a user