File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 1818class Helpers
1919{
2020 const PHP_IDENT = '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]* ' ;
21+ const MAX_DEPTH = 50 ;
2122
2223
2324 /**
@@ -67,7 +68,7 @@ private static function _dump(& $var, $level = 0)
6768 if (empty ($ var )) {
6869 $ out = '' ;
6970
70- } elseif ($ level > 50 || isset ($ var [$ marker ])) {
71+ } elseif ($ level > self :: MAX_DEPTH || isset ($ var [$ marker ])) {
7172 throw new Nette \InvalidArgumentException ('Nesting level too deep or recursive dependency. ' );
7273
7374 } else {
@@ -97,7 +98,7 @@ private static function _dump(& $var, $level = 0)
9798 $ class = get_class ($ var );
9899
99100 static $ list = array ();
100- if ($ level > 50 || in_array ($ var , $ list , TRUE )) {
101+ if ($ level > self :: MAX_DEPTH || in_array ($ var , $ list , TRUE )) {
101102 throw new Nette \InvalidArgumentException ('Nesting level too deep or recursive dependency. ' );
102103
103104 } else {
You can’t perform that action at this time.
0 commit comments