8000 bug #26922 [TwigBundle] fix rendering exception stack traces (xabbuh) · symfony/symfony@baeb1bf · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit baeb1bf

Browse files
committed
bug #26922 [TwigBundle] fix rendering exception stack traces (xabbuh)
This PR was merged into the 3.4 branch. Discussion ---------- [TwigBundle] fix rendering exception stack traces | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | | License | MIT | Doc PR | Commits ------- 99302e7 fix rendering exception stack traces
2 parents 0a02fb1 + 99302e7 commit baeb1bf

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
{% if exception.trace|length %}
2-
<pre class="stacktrace">
32
{{ exception.class }}:
43
{% if exception.message is not empty %}
54
{{- exception.message }}
@@ -8,5 +7,4 @@
87
{% for trace in exception.trace %}
98
{{ include('@Twig/Exception/trace.txt.twig', { trace: trace }, with_context = false) }}
109
{% endfor %}
11-
</pre>
1210
{% endif %}

src/Symfony/Bundle/TwigBundle/Resources/views/Exception/traces_text.html.twig

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,13 @@
1717
<tbody id="trace-text-{{ index }}">
1818
<tr>
1919
<td>
20-
{{ include('@Twig/Exception/traces.txt.twig', { exception: exception }, with_context = false) }}
20+
{% if exception.trace|length %}
21+
<pre class="stacktrace">
22+
{%- filter escape('html') -%}
23+
{{- include('@Twig/Exception/traces.txt.twig', { exception: exception, format: 'html' }, with_context = false) }}
24+
{% endfilter %}
25+
</pre>
26+
{% endif %}
2127
</td>
2228
</tr>
2329
</tbody>

0 commit comments

Comments
 (0)
0