8000 fix FormError access in Twig template by xabbuh · Pull Request #9631 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

fix FormError access in Twig template #9631

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 23, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion validation/severity.rst
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ so that the severity is added as an additional HTML class:
{%- if errors|length > 0 -%}
<ul>
{%- for error in errors -%}
<li class="{{ error.constraint.payload.severity ?? '' }}">{{ error.message }}</li>
<li class="{{ error.cause.constraint.payload.severity ?? '' }}">{{ error.message }}</li>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure about this? I recently merged a pull request that removed cause in this code 😕 Is this cause something that Symfony adds on its own? Thanks!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's how the FormError class looks like: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Form/FormError.php

I also commented on said PR: #9581 (comment)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry for having merged the previous one without reviewing it more in detail. Let's merge your fix right now. Thanks!

{%- endfor -%}
</ul>
{%- endif -%}
Expand Down
0