From bdda71e95505e7f3931449fa413d359d813a8310 Mon Sep 17 00:00:00 2001 From: Sullivan SENECHAL Date: Wed, 28 Dec 2016 14:12:00 +0100 Subject: [PATCH] Check if response exists before showing information (#87) Tells the user otherwise. --- Resources/views/profiler.html.twig | 44 ++++++++++++++++++------------ 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/Resources/views/profiler.html.twig b/Resources/views/profiler.html.twig index 93aebde..6383508 100644 --- a/Resources/views/profiler.html.twig +++ b/Resources/views/profiler.html.twig @@ -19,7 +19,13 @@ {{ message.request.method }} {{ message.request.url }} - {{ message.response.statusPhrase }} ({{ message.response.statusCode }}) + + {% if message.response %} + {{ message.response.statusPhrase }} ({{ message.response.statusCode }}) + {% else %} + N/A + {% endif %} +
@@ -59,22 +65,26 @@

Response

- - - - - - - - - - - - - -
Protocol Version{{ message.response.protocolVersion }}
Headers{{ dump(message.response.headers) }}
Body - -
+ {% if message.response %} + + + + + + + + + + + + + +
Protocol Version{{ message.response.protocolVersion }}
Headers{{ dump(message.response.headers) }}
Body + +
+ {% else %} + No response available. + {% endif %}