From 6175d528e8b2e2111261a75d51ab72447dccaeeb Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Fri, 18 Sep 2020 10:10:16 +0200 Subject: [PATCH] deal with errors being thrown on PHP 8 --- src/Symfony/Component/VarDumper/Caster/SplCaster.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Symfony/Component/VarDumper/Caster/SplCaster.php b/src/Symfony/Component/VarDumper/Caster/SplCaster.php index 7ecbb577d2..360a1a416e 100644 --- a/src/Symfony/Component/VarDumper/Caster/SplCaster.php +++ b/src/Symfony/Component/VarDumper/Caster/SplCaster.php @@ -108,6 +108,14 @@ class SplCaster $a[$prefix.'⚠'] = 'The parent constructor was not called: the object is in an invalid state'; + return $a; + } catch (\Error $e) { + if ('Object not initialized' !== $e->getMessage()) { + throw $e; + } + + $a[$prefix.'⚠'] = 'The parent constructor was not called: the object is in an invalid state'; + return $a; } }