What is causing a “Maximum function nesting level” error in Symfony 2.1 and Twig?

后端 未结 5 1948
滥情空心
滥情空心 2020-12-09 08:51

I have a project on Symfony 2.1. After updating composer components (Gedemo, Symfony core, Doctrine, Twig, etc..) I have the following error:

Fatal error: Ma         


        
5条回答
  •  时光取名叫无心
    2020-12-09 09:03

    Find the xdebug.ini file:

    $ locate xdebug.ini
    /etc/php5/conf.d/20-xdebug.ini
    /etc/php5/mods-available/xdebug.ini
    

    In my case the file is /etc/php5/conf.d/20-xdebug.ini. Open it and add this line:

    xdebug.max_nesting_level = 1000
    

    Don't forget to restart the FPM server.

提交回复
热议问题