S

Handling null conditionals in template engine

  • Thread starter Thread starter stromb0li
  • Start date Start date

Visitor Greeting

Welcome to NullWarehouse.com... We are currently seeking Mod's and Contributors. If you wish to apply for a Mod position then please click on Members dropdown arrow, then click on Staff App and fill it out completely and submit it. If you want to be a Contributor then start contributing and we will have our eye on you and take notice, something great could come of it.

  • We have redone the forum. If you notice any issues or errors please open a Support Ticket under the Members dropdown and let us know.
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 content Most view View more
Back
Top Bottom