Skip to content

Using named parameters #3

Description

@rvulpescu

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);
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions