skolodyazhnyy / symfony-rpc-bundle

Simple JSON and XML RPC Server/Client implementation for Symfony 2
MIT License
25 stars 22 forks source link

Ensure fault code is numeric before returning fault. #21

Closed burahimu closed 3 years ago

burahimu commented 8 years ago

Some rpc servers return a string instead of a code. If it's the case, I'm returning the MethodFault without the code or the application crashed with this error :

Error: Wrong parameters for Exception([string $exception [, long $code [, Exception $previous = NULL]]])

Edit: Look at this https://docs.python.org/3/library/xmlrpc.client.html#fault-objects

burahimu commented 8 years ago

What do you think about htis PR ? I can cast into integer the faultCode but it gonna be wrong...