mirror of
https://github.com/getgrav/grav.git
synced 2026-07-19 18:31:44 +02:00
Fixed $grav['route'] from being modified when the route instance gets modified
This commit is contained in:
@@ -1,3 +1,9 @@
|
||||
# v1.6.9
|
||||
## mm/dd/2019
|
||||
|
||||
1. [](#bugfix)
|
||||
* Fixed `$grav['route']` from being modified when the route instance gets modified
|
||||
|
||||
# v1.6.8
|
||||
## 04/23/2019
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@ class RequestServiceProvider implements ServiceProviderInterface
|
||||
return $creator->fromGlobals();
|
||||
};
|
||||
|
||||
$container['route'] = function() {
|
||||
return Uri::getCurrentRoute();
|
||||
};
|
||||
$container['route'] = $container->factory(function() {
|
||||
return clone Uri::getCurrentRoute();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,6 +193,7 @@ class Route
|
||||
public function withRoute($route)
|
||||
{
|
||||
$this->route = $route;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
@@ -205,6 +206,7 @@ class Route
|
||||
public function withRoot($root)
|
||||
{
|
||||
$this->root = $root;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user