Merge branch 'fix'

This commit is contained in:
Pavel Shevaev 2023-03-23 13:18:43 +03:00
commit 8886377dc2
1 changed files with 5 additions and 1 deletions

View File

@ -158,7 +158,11 @@ function add_twig_support(\Twig\Environment $twig)
$twig->addFunction(new \Twig\TwigFunction('Warn',
function($e)
{
echo "WARN: $e\n";
//NOTE: we can't just echo the value because it will
// be rendered into resulting code
register_shutdown_function(function() use($e) {
echo "WARN: $e\n";
});
}
));
$twig->addFunction(new \Twig\TwigFunction('has_token',