Skip to content

Instantly share code, notes, and snippets.

@lyrixx
Created Jul 17, 2011
Embed
What would you like to do?
Twig String equals 0
Description
-----------
For twig, a string equals 0
Test script
-----------
{% set test = 'a string' %}
{% if test == 0 %}
test == 0
{% else %}
test != 0
{% endif %}
Expected result
---------------
test!=0
Actual result
-------------
test==0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment