Skip to content

Commit

Permalink
[Serializer] Added check of constuctor modifiers to AbstractNormalizer
Browse files Browse the repository at this point in the history
  • Loading branch information
NekaKawaii committed Mar 28, 2019
1 parent fdb0490 commit 984f19a
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -388,6 +388,10 @@ protected function instantiateObject(array &$data, $class, array &$context, \Ref

$constructor = $this->getConstructor($data, $class, $context, $reflectionClass, $allowedAttributes);
if ($constructor) {
if (true !== $constructor->isPublic()) {
return $reflectionClass->newInstanceWithoutConstructor();
}

$constructorParameters = $constructor->getParameters();

$params = [];
Expand Down

0 comments on commit 984f19a

Please sign in to comment.