Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5700de0

Browse files
committed
Updated according to feedback
1 parent f074a6e commit 5700de0

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

src/Symfony/Bundle/FrameworkBundle/DataCollector/MessengerDataCollector.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,11 @@ public function handle($message, callable $next)
6666
'type' => get_class($result),
6767
'object' => $this->cloneVar($result),
6868
);
69+
} elseif (is_array($result)) {
70+
$debugRepresentation['result'] = array(
71+
'type' => 'array',
72+
'object' => $this->cloneVar($result),
73+
);
6974
} else {
7075
$debugRepresentation['result'] = array(
7176
'type' => gettype($result),
@@ -79,7 +84,7 @@ public function handle($message, callable $next)
7984
);
8085
}
8186

82-
$this->data[] = $debugRepresentation;
87+
$this->data['messages'][] = $debugRepresentation;
8388

8489
if (null !== $exception) {
8590
throw $exception;
@@ -90,6 +95,6 @@ public function handle($message, callable $next)
9095

9196
public function getMessages(): array
9297
{
93-
return $this->data;
98+
return $this->data['messages'];
9499
}
95100
}

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/messages.html.twig

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,10 @@
4343
{{ profiler_dump(message.result.object, maxDepth=2) }}
4444
{% elseif message.result.type is defined %}
4545
{{ message.result.type }}
46+
{% if message.result.value is defined %}
47+
{{ message.result.value }}
48+
{% endif %}
4649
{% endif %}
47-
4850
{% if message.exception.type is defined %}
4951
{{ message.exception.type }}
5052
{% endif %}

0 commit comments

Comments
 (0)