Fixed issue #8

This commit is contained in:
Francis Besset 2011-09-08 20:42:09 +02:00
parent e9864b1d02
commit ade1584448

View File

@ -79,12 +79,14 @@ class RpcLiteralResponseMessageBinder implements MessageBinderInterface
$p = $r->getProperty($type->getName());
if ($p->isPublic()) {
$value = $message->{$type->getName()};
$message->{$type->getName()} = $this->processType($type->getValue(), $value);
} else {
$p->setAccessible(true);
$value = $p->getValue($message);
}
$value = $this->processType($type->getValue(), $value);
$p->setValue($message, $this->processType($type->getValue(), $value));
}
if (!$type->isNillable() && null === $value) {
throw new \InvalidArgumentException(sprintf('"%s::%s" cannot be null.', $class, $type->getName()));