S

Handling null conditionals in template engine

  • Thread starter Thread starter stromb0li
  • Start date Start date
S

stromb0li

Guest

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.

HTML:
Code:
<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...

Read more

Continue reading...
 
Similar threads Most view View more
Back
Top Bottom