문제

here is a twig error again: (Don't know, why twig punish me..)

Snippet:

{% if (formDataValues.id OR formDataValues.ID) %}
....
{% endif %}

What i wanna do: Check, if one of these values are given in my array.

My Error:

Twig_Error_Syntax [ 0 ]: An opened parenthesis is not properly closed. Unexpected token "name" of value "OR" ("punctuation" expected with value ")") in "MY/PATH/TO/FILE" at line 1

May you have some creative ideas..

도움이 되었습니까?

해결책

Did you try with a lowercase or and parentheses around the values?

{% if (formDataValues.id) or (formDataValues.ID) %}
....
{% endif %}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top