Lithium PHP函数嵌套问题


Lithium PHP function nesting issue

今天突然发现了这个问题,不确定是什么原因导致的,也不确定如何解决。

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

此处为完整跟踪:http://pastium.org/view/73b48fb1848e65b61607a33de4f49b55

这似乎与mongo文档有很长的嵌套子文档树有关。通常情况下,这不是问题,但如果您安装了xdebug,它会限制100个嵌套调用。更改php.ini中的限制将解决您的问题。

xdebug.max_nesting_level = 200

检查是否安装了XDebug。如果你这样做了,你可以在php.ini 中提高限制

xdebug.max_nesting_level = 200

除此之外,似乎有一个递归函数需要重写,以防止达到该极限。