`{{ false|default(true) }}` gives true, since `default()` obviously treats `false` just like `null` or undefined. It's documented at https://twig.symfony.com/doc/3.x/filters/default.html, but still weird ;-) I just wanted to add this to the wishlist for Twig 4, but the thread at https://github.com/twigphp/Twig/issues/3951 is already closed.
{{ false|default(true) }}gives true, sincedefault()obviously treatsfalsejust likenullor undefined.It's documented at https://twig.symfony.com/doc/3.x/filters/default.html, but still weird ;-)
I just wanted to add this to the wishlist for Twig 4, but the thread at #3951 is already closed.