Closed nnrudakov closed 4 years ago
Confirmed, it seems that our tests broke with Twig 2.7.0. It might have something to do with the security fix to the sandbox: https://github.com/twigphp/Twig/blob/2.x/CHANGELOG#L75
Error appears when environment option strict_variables
is true
. Twig trying to call a method if property is null
which returns __get()
and __isset()
of model. There is no error if strict_variables
is false
. Checked on Twig v2.12.1 also.
Update composer. I have
Admin
model with stringrole
attribute. I have an empty model in create form. My template fragment:And in condition I've got an error:
It works with Twig 2.6.2.
Additional info