Skip to content

[TwigComponent] Empty props throw incomprehensible Exception #1971

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

Closed
smnandre opened this issue Jul 9, 2024 · 2 comments · Fixed by #1988
Closed

[TwigComponent] Empty props throw incomprehensible Exception #1971

smnandre opened this issue Jul 9, 2024 · 2 comments · Fixed by #1988

Comments

@smnandre
Copy link
Member

smnandre commented Jul 9, 2024

Create an anonymous component template, and let props empty

{% props %}

You will get some incomprehensible exception

An exception has been thrown during the compilation of a template ("Warning: Undefined variable $name").

emprty-props

@WebMamba
Copy link
Contributor

I can't reproduce it what is inside your component ? Are your sure you don't have a {{ name }} somewhere ?

@smnandre
Copy link
Member Author

https://github.com/smnandre/repro-empty-props

composer install
symfony server:start
php bin/console open:local

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants