Description
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | no |
RFC? | no |
Symfony version | 3.2.2 |
When using sub-requests and trying to checkout profiler timeline of sub-request I am getting following error:
An exception has been thrown during the rendering of a template ("Catchable Fatal Error: Object of class Symfony\Component\VarDumper\Cloner\Data could not be converted to string").
I have found the issue at following line https://github.com/symfony/symfony/blob/master/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/time.html.twig#L111
When you dump profile.getcollector('request').requestattributes.get('_controller')
you can see that it contains array, not just string.
Data {#3521 ▼
-data: array:1 [▼
0 => array:1 [▼
0 => "Path:ToYour:action"
]
]
-position: 0
-key: 0
-maxDepth: 20
-maxItemsPerDepth: -1
-useRefHandles: -1
}
I would fix it but I am not sure if it should be fixed within the time.html.twig
template or the problem is with VarDumper data cloner hence I am reporting this bug.