lessphp
lessphp copied to clipboard
Fatal error: Maximum function nesting level of '250' reached, aborting!
I have the following error, with Flat-UI Kit by designmodo (download here: https://github.com/designmodo/Flat-UI/archive/master.zip ):
| ( ! ) Fatal error: Maximum function nesting level of '250' reached, aborting! in /website/lessc.inc.php on line 490 | ||||
|---|---|---|---|---|
| Call Stack | ||||
| # | Time | Memory | Function | Location |
| 1 | 0.0026 | 229760 | {main}( ) | ../index.php:0 |
| 2 | 0.0045 | 909032 | lessc->compileFile( ) | ../index.php:10 |
| 3 | 0.0048 | 914304 | lessc->compile( ) | ../lessc.inc.php:1687 |
| 4 | 0.0270 | 979952 | lessc->compileBlock( ) | ../lessc.inc.php:1663 |
| 5 | 0.0271 | 980160 | lessc->compileRoot( ) | ../lessc.inc.php:186 |
| 6 | 0.0271 | 982328 | lessc->compileProps( ) | ../lessc.inc.php:271 |
| 7 | 1.2967 | 7763040 | lessc->compileProp( ) | ../lessc.inc.php:277 |
| 8 | 1.2967 | 7763088 | lessc->compileImportedProps( ) | ../lessc.inc.php:707 |
| 9 | 1.2967 | 7764136 | lessc->compileProp( ) | ../lessc.inc.php:155 |
| 10 | 1.2967 | 7764088 | lessc->compileBlock( ) | ../lessc.inc.php:622 |
| 11 | 1.2967 | 7764088 | lessc->compileCSSBlock( ) | ../lessc.inc.php:189 |
| 12 | 1.2968 | 7766784 | lessc->compileProps( ) | ../lessc.inc.php:215 |
| ... | ... | ... | ... | ... |
| 244 | 1.4444 | 9957664 | lessc->compileProp( ) | ../lessc.inc.php:665 |
| 245 | 1.4444 | 9957968 | lessc->findBlocks( ) | ../lessc.inc.php:628 |
| 246 | 1.4444 | 9958320 | lessc->findBlocks( ) | ../lessc.inc.php:572 |
| 247 | 1.4444 | 9958760 | lessc->findBlocks( ) | ../lessc.inc.php:572 |
| 248 | 1.4444 | 9959288 | lessc->patternMatchAll( ) | ../lessc.inc.php:548 |
| 249 | 1.4444 | 9959640 | lessc->patternMatch( ) | ../lessc.inc.php:529 |
I don't know why I have this error. The compilation is working with the node package.
Seems you have xdebug installed!
Call this function at the beginning of you code: ini_set('xdebug.max_nesting_level', 400) or update your php.ini / .htaccess File with those parameters.
For further information look at http://www.xdebug.org/docs/basic
Indeed, I already tried to put the max_nesting_level to 500 and I have the same error : "Fatal error: Maximum function nesting level of '500' reached, aborting! in /Users/AlexisBarta/Documents/lab/lessc.inc.php on line 490".
And if I totally disable xdebug, I have this error : "Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 130968 bytes) in /Users/AlexisBarta/Documents/lab/lessc.inc.php on line 627".
Same here..the weird thing is that the exact same less files work in another project which uses lessphp 0.3.9.
@delux75 @hacfi Did you solve this?
@ronnyandre I stopped using lessphp a long while ago so not really sure if that’s really an issue or if the code just gets very nested with larger files. I’d try increasing xdebug.max_nesting_level in 100 steps and see what happens.
Same as @hacfi I stopped using it too.