I tried to add a global function in the hello controller in the sandbox 
build a7a9b871be9d94d0807b068e708ef6afbbfa329f using this code,


$this->container->get('twig')->addGlobal('fn_time', new 
\Twig_Function($this, 'time'));


 and when I use it in layout {{ time() }} an error is being thrown.

<https://lh3.googleusercontent.com/_qPwiDzI1928/TRyjs9M7e8I/AAAAAAAAAAM/aVtzAiS_ha0/error.jpg>



-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to