Closed jcubic closed 8 years ago
I have better if helper that evaluate arbitrary expressions using expression.php and I've tried to execute this template:
{{#if "$content =~ \"/^([li].*)/\""}} match: {{$1}} {{/if}}
and get error:
Fatal error: Uncaught InvalidArgumentException: Unknown helper: "[li].*" in /handlebars.php/src/Handlebars/Helpers.php:143
actually I have {{#if $content =~ "/^([li].*)/"}} and add quotes around the expression before calling render method.
{{#if $content =~ "/^([li].*)/"}}
Looking at source code of Template.php helpers are executed if they are in double quotes, I've changed it to single quote and it works.
I have better if helper that evaluate arbitrary expressions using expression.php and I've tried to execute this template:
and get error:
Fatal error: Uncaught InvalidArgumentException: Unknown helper: "[li].*" in /handlebars.php/src/Handlebars/Helpers.php:143
actually I have
{{#if $content =~ "/^([li].*)/"}}
and add quotes around the expression before calling render method.