8000 merged branch fabpot/router-webprofiler (PR #8894) · symfony/symfony@a5dcb32 · GitHub
[go: up one dir, main page]

Skip to content

Commit a5dcb32

Browse files
committed
merged branch fabpot/router-webprofiler (PR #8894)
This PR was merged into the 2.2 branch. Discussion ---------- [HttpKernel] fixed route parameters storage in the Request data collector (closes #8867) | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #8867 | License | MIT | Doc PR | n/a Commits ------- c931eb7 [HttpKernel] fixed route parameters storage in the Request data collector (closes #8867)
2 parents dc1a539 + c931eb7 commit a5dcb32

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/Symfony/Component/HttpKernel/DataCollector/RequestDataCollector.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,14 @@ public function collect(Request $request, Response $response, \Exception $except
5151
$attributes = array();
5252
foreach ($request->attributes->all() as $key => $value) {
5353
if ('_route' == $key && is_object($value)) {
54-
$value = $value->getPath();
54+
$attributes['_route'] = $this->varToString($value->getPath());
55+
} elseif ('_route_params' == $key) {
56+
foreach ($value as $key => $v) {
57+
$attributes['_route_params'][$key] = $this->varToString($v);
58+
}
59+
} else {
60+
$attributes[$key] = $this->varToString($value);
5561
}
56-
57-
$attributes[$key] = $this->varToString($value);
5862
}
5963

6064
$content = null;

0 commit comments

Comments
 (0)
0