Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8ca2677

Browse files
committed
bug #16445 [Serializer] Fixed array_unique on array of objects in getAllowedAttributes.
1 parent 3f0bb90 commit 8ca2677

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/Serializer/Normalizer/AbstractNormalizer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ protected function getAllowedAttributes($classOrObject, array $context, $attribu
204204
}
205205
}
206206

207-
return array_unique($allowedAttributes);
207+
return $attributesAsString ? array_unique($allowedAttributes) : $allowedAttributes;
208208
}
209209

210210
/**

0 commit comments

Comments
 (0)