Skip to content

Commit d700221

Browse files
committed
[HttpKernel] fixed route parameters storage in the Request data collector (closes #8867)
1 parent eaf0064 commit d700221

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

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)