json-rpc-php
json-rpc-php copied to clipboard
Using named parameters
In JsonRpcServer#183 call_user_func_array expects an array, but when using named parameters $requestObject->params is an object. Other than that, the parameters are correctly reordered via introspection, we just need to cast it to array.
private function call($methodOwnerService, $requestObject) {
$callbackFunction = array($methodOwnerService,$requestObject->method);
return call_user_func_array($callbackFunction, (array) $requestObject->params);
}