Prevent infinite recursion in RpcLiteralRequestMessageBinder

This commit is contained in:
Francis Besset
2011-09-08 21:25:45 +02:00
parent 08c51aebcf
commit 154863cc84
2 changed files with 31 additions and 2 deletions

View File

@ -81,9 +81,11 @@ class RpcLiteralRequestMessageBinder implements MessageBinderInterface
{
$hash = spl_object_hash($message);
if (isset($this->messageRefs[$hash])) {
return $message;
return $this->messageRefs[$hash];
}
$this->messageRefs[$hash] = $message;
$r = new \ReflectionClass($message);
foreach ($this->definitionComplexTypes[$phpType] as $type) {
$p = $r->getProperty($type->getName());
@ -101,6 +103,6 @@ class RpcLiteralRequestMessageBinder implements MessageBinderInterface
}
}
return $this->messageRefs[$hash] = $message;
return $message;
}
}