From 58ac241c1d56b1d6b23976476a58c0533fa1c5ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Sun, 22 May 2016 13:56:26 +0200 Subject: [PATCH] [Serializer] ObjectNormalizer: add missing parameters --- .../Component/Serializer/Normalizer/ObjectNormalizer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php b/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php index fc774e6563..2c2457b8ac 100644 --- a/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php +++ b/src/Symfony/Component/Serializer/Normalizer/ObjectNormalizer.php @@ -68,14 +68,14 @@ class ObjectNormalizer extends AbstractObjectNormalizer $attributeName = lcfirst(substr($name, 2)); } - if (null !== $attributeName && $this->isAllowedAttribute($object, $attributeName)) { + if (null !== $attributeName && $this->isAllowedAttribute($object, $attributeName, $format, $context)) { $attributes[$attributeName] = true; } } // properties foreach ($reflClass->getProperties(\ReflectionProperty::IS_PUBLIC) as $reflProperty) { - if ($reflProperty->isStatic() || !$this->isAllowedAttribute($object, $reflProperty->name)) { + if ($reflProperty->isStatic() || !$this->isAllowedAttribute($object, $reflProperty->name, $format, $context)) { continue; }