Skip to content

Commit 25c9cbe

Browse files
bug symfony#58739 [WebProfilerBoundle] form data collector check passed and resolved options are defined (vltrof)
This PR was submitted for the 6.4 branch but it was merged into the 5.4 branch instead. Discussion ---------- [WebProfilerBoundle] form data collector check passed and resolved options are defined | Q | A | ------------- | --- | Branch? | 6.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Issues | Fix symfony#58665 | License | MIT Greetings! When passed or resolved value casted to false (null/false) it sets wrong value what cause exceptions described in issue. Explicit check if value defined prevent this behavior Maybe codestyle should be fixed because of ternary Commits ------- 93faa96 profiler form data collector extart value property if it is setted
2 parents 5865f28 + 93faa96 commit 25c9cbe

File tree

1 file changed

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

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -650,8 +650,10 @@
650650
<td>{{ profiler_dump(value) }}</td>
651651
<td>
652652
{# values can be stubs #}
653-
{% set option_value = value.value|default(value) %}
654-
{% set resolved_option_value = data.resolved_options[option].value|default(data.resolved_options[option]) %}
653+
{% set option_value = (value.value is defined) ? value.value : value %}
654+
{% set resolved_option_value = (data.resolved_options[option].value is defined)
655+
? data.resolved_options[option].value
656+
: data.resolved_options[option] %}
655657
{% if resolved_option_value == option_value %}
656658
<em class="font-normal text-muted">same as passed value</em>
657659
{% else %}

0 commit comments

Comments
 (0)