From 143f82ef8e802c0f09622e09f58f5ff7508c1dd5 Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Tue, 20 Oct 2020 14:40:03 +0200 Subject: [PATCH] forward the caught exception --- src/Symfony/Component/PropertyAccess/PropertyAccessor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Symfony/Component/PropertyAccess/PropertyAccessor.php b/src/Symfony/Component/PropertyAccess/PropertyAccessor.php index cdf61947f4552..c0fb4d7beed37 100644 --- a/src/Symfony/Component/PropertyAccess/PropertyAccessor.php +++ b/src/Symfony/Component/PropertyAccess/PropertyAccessor.php @@ -115,7 +115,7 @@ public function setValue(&$objectOrArray, $propertyPath, $value) return; } catch (\TypeError $e) { - self::throwInvalidArgumentException($e->getMessage(), $e->getTrace(), 0, $propertyPath); + self::throwInvalidArgumentException($e->getMessage(), $e->getTrace(), 0, $propertyPath, $e); // It wasn't thrown in this class so rethrow it throw $e; }