8000 [VarDumper] fix infinite recursion · symfony/symfony@56d9f47 · GitHub
[go: up one dir, main page]

Skip to content

Commit 56d9f47

Browse files
[VarDumper] fix infinite recursion
1 parent bfd308f commit 56d9f47

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/Symfony/Component/VarDumper/Caster/ClassStub.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public function __construct(string $identifier, $callable = null)
6262
}
6363

6464
if (null !== $callable && $r instanceof \ReflectionFunctionAbstract) {
65-
$s = ReflectionCaster::castFunctionAbstract($r, [], new Stub(), true);
65+
$s = ReflectionCaster::castFunctionAbstract($r, [], new Stub(), true, Caster::EXCLUDE_VERBOSE);
6666
$s = ReflectionCaster::getSignature($s);
6767

6868
if ('()' === substr($identifier, -2)) {

src/Symfony/Component/VarDumper/Caster/ReflectionCaster.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ public static function castFunctionAbstract(\ReflectionFunctionAbstract $c, arra
212212
$a[$prefix.'parameters'] = new EnumStub($a[$prefix.'parameters']);
213213
}
214214

215-
if ($v = $c->getStaticVariables()) {
215+
if (!($filter & Caster::EXCLUDE_VERBOSE) && $v = $c->getStaticVariables()) {
216216
foreach ($v as $k => &$v) {
217217
if (\is_object($v)) {
218218
$a[$prefix.'use']['$'.$k] = new CutStub($v);

0 commit comments

Comments
 (0)
0