Skip to content

Commit 5e4cb91

Browse files
dunglasfabpot
authored andcommitted
[Serializer] AbstractObjectNormalizer: be sure that isAllowedAttribute is called
1 parent 3c75f2d commit 5e4cb91

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Normalizer/AbstractObjectNormalizer.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -182,10 +182,7 @@ public function denormalize($data, $class, $format = null, array $context = arra
182182
$attribute = $this->nameConverter->denormalize($attribute);
183183
}
184184

185-
$allowed = $allowedAttributes === false || in_array($attribute, $allowedAttributes);
186-
$ignored = in_array($attribute, $this->ignoredAttributes);
187-
188-
if (!$allowed || $ignored) {
185+
if (($allowedAttributes !== false && !in_array($attribute, $allowedAttributes)) || !$this->isAllowedAttribute($class, $attribute, $format, $context)) {
189186
continue;
190187
}
191188

0 commit comments

Comments
 (0)