8000 bug #18837 [Serializer] AbstractObjectNormalizer: be sure that isAllo… · symfony/symfony@7dc1491 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 7dc1491

Browse files
committed
bug #18837 [Serializer] AbstractObjectNormalizer: be sure that isAllowedAttribute is called (dunglas)
This PR was submitted for the master branch but it was merged into the 3.1 branch instead (closes #18837). Discussion ---------- [Serializer] AbstractObjectNormalizer: be sure that isAllowedAttribute is called | Q | A | ------------- | --- | Branch? | 3.1 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | n/a Please merge before the release of 3.1 (potential bug fix) Commits ------- 29b4115 [Serializer] AbstractObjectNormalizer: be sure that isAllowedAttribute is called
2 parents 070a02c + 29b4115 commit 7dc1491

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

src/Symfony/Component/Serializer/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)
0