Skip to content
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

Fix display of enums for nullable property #8039

Merged
merged 1 commit into from
Apr 11, 2023
Merged

Fix display of enums for nullable property #8039

merged 1 commit into from
Apr 11, 2023

Conversation

AirBair
Copy link
Contributor

@AirBair AirBair commented Apr 11, 2023

Subject

When displaying an enum in list or show view, the twig template don't check for potential null value (nullable property in entity for example) and crash with Impossible to access an attribute ("name") on a null variable.

This fix just add the missing check in display_enum.html.twig.

I am targeting this branch, because this is a patch without breaking change.

Changelog

### Fixed
- Fix display of enums for nullable property

@VincentLanglet VincentLanglet merged commit 954146c into sonata-project:4.x Apr 11, 2023
23 checks passed
@VincentLanglet
Copy link
Member

Thanks

@AirBair AirBair deleted the fix-nullable-enums-display branch April 11, 2023 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants