Search code examples
phplithium

Lithium PHP function nesting issue


Got this out of the blue today, not sure what caused it or how to resolve it.

Fatal error: Maximum function nesting level of '100' reached, aborting! in /var/www/apps/vitals-app/releases/20120127155310/libraries/lithium/util/Collection.php on line 110

Call Stack:
    0.0077     634440   1. {main}() /var/www/apps/vitals-app/releases/20120127155310/app/webroot/index.php:0
    0.4413    6223432   2. lithium\action\Dispatcher::run() /var/www/apps/vitals-app/releases/20120127155310/app/webroot/index.php:41
    0.4413    6225544   3. lithium\core\StaticObject::_filter() /var/www/apps/vitals-app/releases/20120127155310/libraries/lithium/action/Dispatcher.php:123
    0.4413    6228576   4. lithium\util\collection\Filters::run() /var/www/apps/vitals-app/releases/20120127155310/libraries/lithium/core/StaticObject.php:126

Full trace here: http://pastium.org/view/73b48fb1848e65b61607a33de4f49b55


Solution

  • This looks like it has to do with your mongo document having very long tree of nested subdocuments. Normally this is not an issue but if you have xdebug installed, it puts a limit of a 100 nested calls. Changing the limit in your php.ini will fix your issue.

    xdebug.max_nesting_level = 200