8000 Cannot convert VarDumper\Cloner\Data to string while using sub-requests - profiler bug · Issue #21911 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to 8000 content
Cannot convert VarDumper\Cloner\Data to string while using sub-requests - profiler bug #21911
Closed
@ivanbarlog

Description

@ivanbarlog
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.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0