Skip to content

Commit ba65757

Browse files
committed
minor symfony#38227 [VarDumper] deal with errors being thrown on PHP 8 (xabbuh)
This PR was merged into the 3.4 branch. Discussion ---------- [VarDumper] deal with errors being thrown on PHP 8 | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | no | New feature? | no | Deprecations? | no | Tickets | | License | MIT | Doc PR | Commits ------- 6175d52 deal with errors being thrown on PHP 8
2 parents 6b8857c + 6175d52 commit ba65757

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,14 @@ public static function castFileInfo(\SplFileInfo $c, array $a, Stub $stub, $isNe
108108

109109
$a[$prefix.''] = 'The parent constructor was not called: the object is in an invalid state';
110110

111+
return $a;
112+
} catch (\Error $e) {
113+
if ('Object not initialized' !== $e->getMessage()) {
114+
throw $e;
115+
}
116+
117+
$a[$prefix.''] = 'The parent constructor was not called: the object is in an invalid state';
118+
111119
return $a;
112120
}
113121
}

0 commit comments

Comments
 (0)