This PR was squashed before being merged into the master branch (closes #1042).
Discussion
----------
Registration a Twig_SimpleFunction after extensions initialized throw not LogicException, but Fatal Error
Registration a Twig_SimpleFunction after extensions initialized throw not LogicException, but Fatal Error:
$environment->addFunction(new Twig_SimpleFunction(...))
after
$environment->render(...)
throws Fatal Error:
object of Twig_SimpleFunction could not be converted to string
Commits
-------
92e97b9 Registration a Twig_SimpleFunction after extensions initialized throw not LogicException, but Fatal Error