Maximum function nesting level of '100' reached, aborting after upgrading to Laravel 5.1

后端 未结 3 1362
时光说笑
时光说笑 2020-12-05 06:02

I\'m getting this error message in my Laravel application after I upgraded to Laravel 5.1.

FatalErrorException in Dispatcher.php line 200:
Maximum function n         


        
3条回答
  •  一向
    一向 (楼主)
    2020-12-05 06:17

    Issue is caused by default xdebug.max_nesting_level which is 100.

    The workaround for now is to increase xdebug.max_nesting_level to a certain level say 200 or 300 or 400

    I fixed mine by increasing xdebug.max_nesting_level to 120, by adding the line below to bootstrap/autoload.php in Laravel 5.1

    ini_set('xdebug.max_nesting_level', 120);

    .........

    define('LARAVEL_START', microtime(true));

提交回复
热议问题