Skip to content

Commit 6a12f1e

Browse files
committed
[Serializer] Optimize ObjectNormalizer
1 parent c641efd commit 6a12f1e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ public function normalize($object, $format = null, array $context = array())
9999

100100
$attributeValue = $this->propertyAccessor->getValue($object, $attribute);
101101

102-
if (array_key_exists($attribute, $this->callbacks)) {
102+
if (isset($this->callbacks[$attribute])) {
103103
$attributeValue = call_user_func($this->callbacks[$attribute], $attributeValue);
104104
}
105105

0 commit comments

Comments
 (0)