Twig Problem with PHP 7.4 in Write Variable

PHP 7.4 trimming whitespace between string variables

Faced the same issue on PHP 7.4. Found this fix on GitHub.

So if you're using Twig 1, upgrade it at least to v1.43.0.

If you're using Twig 2, upgrade it at least to v2.10.0. (my case - I had v2.7.4 in the project).

How to add space between variables in twig template?

If {{ civilite }} {{ nom }} {{ prenom }} doesn't work...

how about

{{ civilite }} {{ nom }} {{ prenom }}?

set variables to twig when redirect link?

I don't quite understand what you want to do, if you want to put a link in a twig template or just redirect from a controller according a condition. if you can give more details of what you want to do I think I can help you.

UPDATE (solution)

You could use "Forwarding to Another Controller" instead of using "Redirect" and from there to send the variables to the twig template



Related Topics



Leave a reply



Submit