Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1e794ca

Browse filesBrowse files
committed
Check if a field type_class is defined before using it.
This make the check consistent with a similar check in this template made further down, and fixes an issue with fields added to the form after the form was built.
1 parent 4cec9a9 commit 1e794ca
Copy full SHA for 1e794ca

File tree

1 file changed

+2
-2
lines changed
Filter options
  • src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector

1 file changed

+2
-2
lines changed

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

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/WebProfilerBundle/Resources/views/Collector/form.html.twig
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@
420420
{% else %}
421421
<div class="toggle-icon empty"></div>
422422
{% endif %}
423-
{{ name|default('(no name)') }} {% if data.type is not empty %}[<abbr title="{{ data.type_class }}">{{ data.type }}</abbr>]{% endif %}
423+
{{ name|default('(no name)') }} {% if data.type_class is defined and data.type is defined %}[<abbr title="{{ data.type_class }}">{{ data.type }}</abbr>]{% endif %}
424424
{% if data.errors is defined and data.errors|length > 0 %}
425425
<div class="badge-error">{{ data.errors|length }}</div>
426426
{% endif %}
@@ -440,7 +440,7 @@
440440
<div class="tree-details" {% if data.id is defined %} id="{{ data.id }}-details"{% endif %}>
441441
<h2>
442442
{{ name|default('(no name)') }}
443-
{% if data.type_class is defined %}
443+
{% if data.type_class is defined and data.type is defined %}
444444
<span class="form-type">[<abbr title="{{ data.type_class }}">{{ data.type }}</abbr>]</span>
445445
{% endif %}
446446
</h2>

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.