json-rpc2php icon indicating copy to clipboard operation
json-rpc2php copied to clipboard

Changes on My version php

Open eolandro opened this issue 10 years ago • 2 comments

helllo

On the server there is something sttrage : in funtion private function validate() { ....... if (!isset($this->classes[$this->extension]) || !method_exists($this->classes[$this->extension],$this->request['method']) && $this->extension != "rpc"){ ###hacks if($this->request['method']!='listMethods'){ throw new Exception($this->errorCodes['methodNotFound']); }###hacks

        };

........
}

i had to add the "if($this->request['method']!='listMethods'){" because fails to get the "listMethods" and raise "rpcException: -32601::Method not found" on Debian Unstable and PHP 5.5.9-1

eolandro avatar Mar 25 '14 05:03 eolandro

strange, I'm using the latest version (I've been updating it the past few days) in a project of mine and haven't had this problem. Try to use the latest version. maybe I've fixed it in the past few days.

subutux avatar Apr 01 '14 14:04 subutux

Getting a similar related issue with latest version on the 'listMethods' call

line 227 if (!method_exists($this->classes[$this->extension],$this->request['method']) && $this->extension != "rpc"){

throws a php error Notice: Undefined index: rpc in jsonRPC2Server.php on line 227

I wrapped the block of code with if($this->request['method']!='listMethods'){

}

I was just using the demo ping/pong app

blackmambahk avatar Jun 18 '14 18:06 blackmambahk