From b5704a9e7ec142368da020f15d7b30fdcf356b0d Mon Sep 17 00:00:00 2001 From: satalaondrej Date: Wed, 10 Nov 2021 20:33:30 +0100 Subject: [PATCH] [Serializer] PropertyNormalizer - return unique (i.e. filter duplicate ) attributes in extractAttributes function --- Normalizer/PropertyNormalizer.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Normalizer/PropertyNormalizer.php b/Normalizer/PropertyNormalizer.php index 9989c60e4..8ecd34081 100644 --- a/Normalizer/PropertyNormalizer.php +++ b/Normalizer/PropertyNormalizer.php @@ -119,7 +119,7 @@ protected function extractAttributes($object, $format = null, array $context = [ } } while ($reflectionObject = $reflectionObject->getParentClass()); - return $attributes; + return array_unique($attributes); } /**