I\'m getting this error in a app I am migrating from SF2.0.x to SF2.7:
[1] Symfony\\Component\\Debug\\Exception\\FatalErrorException: Compile Error: Cannot u
Why are you doing so much useless code?
Why don't just:
{% if form_action|empty == true %} {% set form_action = '' %} {% endif %}
From documentation:
isset() only works with variables as passing anything else will result in a parse error.
You're not directly passing a variable to isset()
. So you need to calculate the value first, assign it to a variable, and then pass that to isset()
.
For example, what you're doing at the moment is something like:
if(isset($something === false)) { } // throws a parse error, because $something === false is not a variable
What you need to do instead is:
$something = false;
if(isset($something)) { ... }