On 12/9/10 1:42 PM, Dennis Jacobfeuerborn wrote:
I just noticed that this only happens in the development environment and
not the production one (Right now I spend 100% of my time in the
development env.) so I guess this simply a change in behavior in the
dev. env from previous versions.
Is this strict checking really a useful default even in the dev. env.
though? I imagine a lot of people are going to use things like |default
syntax and conditional checking of variables in their templates so they
will all have to make a change to their dev configs to make things work.
Wouldn't it be better to keep this turned off and let the people who
really want this kind of strict checking explicitly turn it on in their
dev configuration?

I have enabled strict_variables in the debug env by default to avoid WTF moments when you have a typo in your variable name.

The "correct" use of |default() is not to test if a variable is defined or, you should use "is defined" instead:

{{ foo is defined ? ... }}

Fabien

Regards,
Dennis

--
If you want to report a vulnerability issue on symfony, please send it
to security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

--
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to