8000 fix merge · symfonyaml/symfony@f6a425b · GitHub
[go: up one dir, main page]

Skip to content

Commit f6a425b

Browse files
committed
fix merge
1 parent 9f87a34 commit f6a425b

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,10 @@ public function normalize(mixed $object, string $format = null, array $context =
185185
}
186186

187187
$attributeContext = $this->getAttributeNormalizationContext($object, $attribute, $context);
188-
$discriminatorMapping = $this->classDiscriminatorResolver?->getMappingForMappedObject($object);
189188

190189
try {
191-
$attributeValue = $attribute === $discriminatorMapping?->getTypeProperty()
192-
? $discriminatorMapping
190+
$attributeValue = $attribute === $this->classDiscriminatorResolver?->getMappingForMappedObject($object)?->getTypeProperty()
191+
? $this->classDiscriminatorResolver?->getTypeForMappedObject($object)
193192
: $this->getAttributeValue($object, $attribute, $format, $attributeContext);
194193
} catch (UninitializedPropertyException $e) {
195194
if ($context[self::SKIP_UNINITIALIZED_VALUES] ?? $this->defaultContext[self::SKIP_UNINITIALIZED_VALUES] ?? true) {

0 commit comments

Comments
 (0)
0