8000 [TwigBundle] Hide logs if unavailable, i.e. webprofiler · ostrolucky/symfony@03cd9e5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 03cd9e5

Browse files
committed
[TwigBundle] Hide logs if unavailable, i.e. webprofiler
1 parent b28dfe1 commit 03cd9e5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,15 @@
5454
</div>
5555
</div>
5656

57-
<div class="tab {{ logger is empty ? 'disabled' }}">
57+
{% if logger %}
58+
<div class="tab {{ logger.logs is empty ? 'disabled' }}">
5859
<h3 class="tab-title">
5960
Logs
6061
{% if logger.counterrors ?? false %}<span class="badge status-error">{{ logger.counterrors }}</span>{% endif %}
6162
</h3>
6263

6364
<div class="tab-content">
64-
{% if logger %}
65+
{% if logger.logs %}
6566
{{ include('@Twig/Exception/logs.html.twig', { logs: logger.logs }, with_context = false) }}
6667
{% else %}
6768
<div class="empty">
@@ -70,6 +71,7 @@
7071
{% endif %}
7172
</div>
7273
</div>
74+
{% endif %}
7375

7476
<div class="tab">
7577
<h3 class="tab-title">

0 commit comments

Comments
 (0)
0