[HttpKernel] Fixed DataCollector Request attributes when attributes have objects
This commit is contained in:
parent
f51dafca3f
commit
9f52333bf6
@ -39,6 +39,11 @@ class RequestDataCollector extends DataCollector
|
||||
$responseHeaders['Set-Cookie'] = $cookies;
|
||||
}
|
||||
|
||||
$attributes = array();
|
||||
foreach ($request->attributes->all() as $key => $value) {
|
||||
$attributes[$key] = is_object($value) ? sprintf('Object(%s)', get_class($value)) : $value;
|
||||
}
|
||||
|
||||
$this->data = array(
|
||||
'format' => $request->getRequestFormat(),
|
||||
'content_type' => $response->headers->get('Content-Type') ? $response->headers->get('Content-Type') : 'text/html',
|
||||
@ -48,7 +53,7 @@ class RequestDataCollector extends DataCollector
|
||||
'request_headers' => $request->headers->all(),
|
||||
'request_server' => $request->server->all(),
|
||||
'request_cookies' => $request->cookies->all(),
|
||||
'request_attributes' => $request->attributes->all(),
|
||||
'request_attributes' => $attributes,
|
||||
'response_headers' => $responseHeaders,
|
||||
'session_attributes' => $request->hasSession() ? $request->getSession()->getAttributes() : array(),
|
||||
);
|
||||
|
Reference in New Issue
Block a user