Fluid icon indicating copy to clipboard operation
Fluid copied to clipboard

Allow variables within strings in BooleanParser

Open simonschaufi opened this issue 3 years ago • 1 comments

The following test case currently is not possible as the boolean parser either accepts strings OR variables but not both.

['\'{foo}\' == \'{bar}\'', true, ['foo' => 'a', 'bar' => 'a']],

I would expect this to be true. A workaround is to assign the string to a variable before with the f:variable-ViewHelper and then use the new created variable for comparison.

simonschaufi avatar May 07 '22 22:05 simonschaufi

To clarify, this would be a use case for this (string concatenation within condition):

['{foo} == \'{bar} {baz}\'', true, ['foo' => 'a b', 'bar' => 'a', 'baz' => 'b']],

And I can confirm that this currently does not work.

s2b avatar Aug 11 '24 08:08 s2b