[#220] book() function throws error 'Request error: Client with given id not found'

Migrated from Redmine #220 | Author: Dan Dev
Status: Closed | Priority: High, I’m very impatient | Created: 2018-08-16


book() function throws error ‘Request error: Client with given id not found’.

I tired to figure out what’s the problem, but still cannot find the reason.
Here is the code:

$result = $client->book(1, $unitId[0], $_POST["date"], $_POST["time"], (object) ["name" => $_POST["name"], "email" => $_POST["email"], "phone" => $_POST["phone"]]);

It would be great if you could point me out what I’m doing wrong.

Thanks!

Redmine Admin wrote:

If you use JsonRpcClient.php then client data need to be an array not object

Dan Dev wrote:

Redmine Admin wrote:

If you use JsonRpcClient.php then client data need to be an array not object

Thanks!

We’ve already solved the problem, so the issue can be closed.