raintpl3 icon indicating copy to clipboard operation
raintpl3 copied to clipboard

Function parameter bug

Open kargnas opened this issue 11 years ago • 1 comments

Template

{$array.var|func:"Y-m-d H:i"}

Compiled code

<?php echo func($array["var"],"Y-m-d) H:i"; ?>

Must be:

<?php echo func($array["var"],"Y-m-d H:i"); ?>

kargnas avatar Aug 24 '13 21:08 kargnas

The parsing of function arguments in modifiers is entirely broken. You cannot use any other character than in a variable name, a comma is parsed as argument separater even if occuring inside quotes, quotes are not supported correctly (only double quotes, not single quotes, and so on). I gave up fixing what I started to fix in #193.

Natureshadow avatar Apr 28 '19 13:04 Natureshadow