Fixing Warn(..) function so that it doesn't output into resulting code
This commit is contained in:
parent
df2e4fd44a
commit
dc48f11d97
|
@ -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',
|
||||
|
|
Loading…
Reference in New Issue