We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8fe672e commit 473c605Copy full SHA for 473c605
ChainRouter.php
@@ -91,10 +91,12 @@ public function all()
91
if (empty($this->sortedRouters)) {
92
$this->sortedRouters = $this->sortRouters();
93
94
+ // setContext() is done here instead of in add() to avoid fatal errors when clearing and warming up caches
95
+ // See https://github.com/symfony-cmf/Routing/pull/18
96
$context = $this->getContext();
- foreach ($this->sortedRouters as $router) {
- if ($router instanceof RequestContextAwareInterface) {
97
- if (null !== $context) {
+ if (null !== $context) {
98
+ foreach ($this->sortedRouters as $router) {
99
+ if ($router instanceof RequestContextAwareInterface) {
100
$router->setContext($context);
101
}
102
0 commit comments