Skip to content

Commit 88c5910

Browse files
committed
[Form][WebProfiler] Empty form names fix
When a Form had no name, the markup was broken in the profiler, making the form tree ugly.
1 parent 3fb5ad4 commit 88c5910

File tree

1 file changed

+5
-1
lines changed
  • src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector

1 file changed

+5
-1
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,11 @@
420420
{% else %}
421421
<div class="toggle-icon empty"></div>
422422
{% endif %}
423-
{{ name }}
423+
{% if name is not empty %}
424+
{{ name }}
425+
{% else %}
426+
(no name)
427+
{% endif %}
424428
{% if data.errors is defined and data.errors|length > 0 %}
425429
<div class="badge-error">{{ data.errors|length }}</div>
426430
{% endif %}

0 commit comments

Comments
 (0)