Not sure if this should be a discussion or bug, so please move accordingly.
In 2.2.x I had the following in my template.
In 2.3.4 I see a type error if $data.items is null, since contains is expecting a value.
Is this a bug where the template engine should check for null values or does the template engine expect types to be strictly enforced (which is what I see in the error) and I should check if the value is null in the condition?
I see the same issue if I did something like
In 2.2.x I had the following in my template.
HTML:
<xf:option name="option_array[]" value="myvalue" checked="{{ contains($data.items, 'item1') ? 'checked' : '' }}">
myvalue
</xf:option>
In 2.3.4 I see a type error if $data.items is null, since contains is expecting a value.
Is this a bug where the template engine should check for null values or does the template engine expect types to be strictly enforced (which is what I see in the error) and I should check if the value is null in the condition?
I see the same issue if I did something like
{{$myarray.myvalue|to_lower}}
and $myarray
is null. In 2.2.x this would be valid, but in 2.3, this will result with a type error.