8000 [VarDumper] Fix error when reflected class has default Enum parameter… · wouterj/symfony@d6a7730 · GitHub
[go: up one dir, main page]

Skip to content

Commit d6a7730

Browse files
kapiwkonicolas-grekas
authored andcommitted
[VarDumper] Fix error when reflected class has default Enum parameter in constructor
1 parent 111af45 commit d6a7730

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ public static function castParameter(\ReflectionParameter $c, array $a, Stub $st
292292
if ($c->isOptional()) {
293293
try {
294294
$a[$prefix.'default'] = $v = $c->getDefaultValue();
295-
if ($c->isDefaultValueConstant()) {
295+
if ($c->isDefaultValueConstant() && !\is_object($v)) {
296296
$a[$prefix.'default'] = new ConstStub($c->getDefaultValueConstantName(), $v);
297297
}
298298
if (null === $v) {

0 commit comments

Comments
 (0)
0