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 18
18
class Helpers
19
19
{
20
20
const PHP_IDENT = '[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]* ' ;
21
+ const MAX_DEPTH = 50 ;
21
22
22
23
23
24
/**
@@ -67,7 +68,7 @@ private static function _dump(& $var, $level = 0)
67
68
if (empty ($ var )) {
68
69
$ out = '' ;
69
70
70
- } elseif ($ level > 50 || isset ($ var [$ marker ])) {
71
+ } elseif ($ level > self :: MAX_DEPTH || isset ($ var [$ marker ])) {
71
72
throw new Nette \InvalidArgumentException ('Nesting level too deep or recursive dependency. ' );
72
73
73
74
} else {
@@ -97,7 +98,7 @@ private static function _dump(& $var, $level = 0)
97
98
$ class = get_class ($ var );
98
99
99
100
static $ list = array ();
100
- if ($ level > 50 || in_array ($ var , $ list , TRUE )) {
101
+ if ($ level > self :: MAX_DEPTH || in_array ($ var , $ list , TRUE )) {
101
102
throw new Nette \InvalidArgumentException ('Nesting level too deep or recursive dependency. ' );
102
103
103
104
} else {
You can’t perform that action at this time.
0 commit comments