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 authored and fabpot committed Mar 30, 2019
1 parent 2b73460 commit eb0e14c
Showing 1 changed file with 4 additions and 0 deletions.
Expand Up @@ -333,6 +333,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 eb0e14c

Please sign in to comment.