简体   繁体   English

为什么会出现此Spreadsheet_Excel_Writer致命错误:使用writeFormula()的最大函数嵌套级别?

[英]Why am I getting this Spreadsheet_Excel_Writer Fatal error: Maximum function nesting level with writeFormula()?

A maximum function nesting level is reached when I use the writeFormula() function. 当我使用writeFormula()函数时,达到了最大的函数嵌套级别。

Why am I getting this error? 为什么会出现此错误? and How can it be solved? 以及如何解决?

Note that if I don't separate into functions and pass the $workbook as a parameter by reference to seperate functions calling writeFormula() ,I do not get the error. 请注意,如果我不拆分为函数,而是by reference调用writeFormula()独立函数,将$workbook作为参数传递,则不会收到错误。

It seems to get into a loop: 似乎陷入了一个循环:

#   Time    Memory  Function    Location
1   0.0013  152136  {main}( )   ..\index.php:0
2   0.2733  3717224 Zend_Application->run( )    ..\index.php:26
3   0.2733  3717248 Zend_Application_Bootstrap_Bootstrap->run( )    ..\Application.php:366
4   0.2737  3717472 Zend_Controller_Front->dispatch( )  ..\Bootstrap.php:97
5   0.5772  5224336 Zend_Controller_Dispatcher_Standard->dispatch( )    ..\Front.php:954
6   0.6058  5406400 Zend_Controller_Action->dispatch( ) ..\Standard.php:308
7   0.6062  5410664 ReportsController->excelAction( )   ..\Action.php:516
8   0.7471  9181488 Null_Spreadsheet_Excel_Writer->add_annual_worksheet( )  ..\ReportsController.php:42
9   4.1182  9851488 Null_Spreadsheet_Excel_Writer->add_trainingquantity( )  ..\Writer.php:403
10  4.1194  9852208 Spreadsheet_Excel_Writer_Worksheet->writeFormula( ) ..\Writer.php:417
11  4.1196  9852712 Spreadsheet_Excel_Writer_Parser->parse( )   ..\Worksheet.php:1787
12  4.1207  9853200 Spreadsheet_Excel_Writer_Parser->_condition( )  ..\Parser.php:1295
13  4.1207  9853536 Spreadsheet_Excel_Writer_Parser->_expression( ) ..\Parser.php:1311
14  4.1207  9853736 Spreadsheet_Excel_Writer_Parser->_term( )   ..\Parser.php:1391
15  4.1207  9853864 Spreadsheet_Excel_Writer_Parser->_fact( )   ..\Parser.php:1440
16  4.1209  9854224 Spreadsheet_Excel_Writer_Parser->_func( )   ..\Parser.php:1540
17  4.1235  9854536 Spreadsheet_Excel_Writer_Parser->_condition( )  ..\Parser.php:1579
18  4.1235  9854536 Spreadsheet_Excel_Writer_Parser->_expression( ) ..\Parser.php:1311
19  4.1235  9854536 Spreadsheet_Excel_Writer_Parser->_term( )   ..\Parser.php:1391
20  4.1235  9854536 Spreadsheet_Excel_Writer_Parser->_fact( )   ..\Parser.php:1440
21  4.1259  9854536 Spreadsheet_Excel_Writer_Parser->_parenthesizedExpression( )    ..\Parser.php:1481
22  4.1259  9854616 Spreadsheet_Excel_Writer_Parser->_expression( ) ..\Parser.php:1427
23  4.1259  9854616 Spreadsheet_Excel_Writer_Parser->_term( )   ..\Parser.php:1391
24  4.1259  9854616 Spreadsheet_Excel_Writer_Parser->_fact( )   ..\Parser.php:1440
25  4.1283  9854616 Spreadsheet_Excel_Writer_Parser->_parenthesizedExpression( )    ..\Parser.php:1481
26  4.1283  9854672 Spreadsheet_Excel_Writer_Parser->_expression( ) ..\Parser.php:1427
27  4.1284  9854672 Spreadsheet_Excel_Writer_Parser->_term( )   ..\Parser.php:1391
28  4.1284  9854672 Spreadsheet_Excel_Writer_Parser->_fact( )   ..\Parser.php:1440
29  4.1308  9854672 Spreadsheet_Excel_Writer_Parser->_parenthesizedExpression( )    ..\Parser.php:1481

The below part is repeated till the max nesting level is reached: 重复以下部分,直到达到最大嵌套级别:

30  4.1308  9854728 Spreadsheet_Excel_Writer_Parser->_expression( ) ..\Parser.php:1427
31  4.1308  9854728 Spreadsheet_Excel_Writer_Parser->_term( )   ..\Parser.php:1391
32  4.1308  9854728 Spreadsheet_Excel_Writer_Parser->_fact( )   ..\Parser.php:1440
33  4.1332  9854728 Spreadsheet_Excel_Writer_Parser->_parenthesizedExpression( )    ..\Parser.php:1481

This is an xdebug setting. 这是一个xdebug设置。 Modify your php.ini and increase xdebug.max_nesting_level . 修改您的php.ini并增加xdebug.max_nesting_level

34 is pretty low. 34很低。


Try to increase it to 1024. If that does not work, report a bug with the exact code needed to reproduce the bug. 尝试将其增加到1024。如果这样不起作用,请报告一个错误,并提供重现该错误的确切代码。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM