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

Skip to content

Commit af6ada5

Browse files
committed
bug #18959 [WebProfilerBundle] Fixed forwarded request data in templates (HeahDude)
This PR was merged into the 3.1 branch. Discussion ---------- [WebProfilerBundle] Fixed forwarded request data in templates | Q | A | ------------- | --- | Branch? | 3.1 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | silexphp/Silex-WebProfiler#92 | License | MIT | Doc PR | ~ Fixes a bug occurring when the `FrameworkBundle` is not part of the dependencies (i.e using Silex). Commits ------- 078c8b6 Fixed forwarded request data in templates
2 parents d1b0301 + 078c8b6 commit af6ada5

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
{% endset %}
1414
{% endif %}
1515

16-
{% if collector.forward %}
16+
{% if collector.forward|default(false) %}
1717
{% set forward_handler %}
1818
{% import _self as helper %}
1919
{{ helper.set_handler(collector.forward.controller) }}
@@ -26,7 +26,7 @@
2626
<span class="sf-toolbar-status sf-toolbar-status-{{ request_status_code_color }}">{{ collector.statuscode }}</span>
2727
{% if collector.route %}
2828
{% if collector.redirect %}{{ include('@WebProfiler/Icon/redirect.svg') }}{% endif %}
29-
{% if collector.forward %}{{ include('@WebProfiler/Icon/forward.svg') }}{% endif %}
29+
{% if collector.forward|default(false) %}{{ include('@WebProfiler/Icon/forward.svg') }}{% endif %}
3030
<span class="sf-toolbar-label">{{ 'GET' != collector.method ? collector.method }} @</span>
3131
<span class="sf-toolbar-value sf-toolbar-info-piece-additional">{{ collector.route }}</span>
3232
{% endif %}

src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/layout.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
</dl>
4545
{%- endif %}
4646

47-
{% if request_collector and request_collector.forward and request_collector.forward.controller.class is defined -%}
47+
{% if request_collector and request_collector.forward|default(false) and request_collector.forward.controller.class is defined -%}
4848
{%- set forward = request_collector.forward -%}
4949
{%- set controller = forward.controller -%}
5050
<dl class="metadata">

0 commit comments

Comments
 (0)