Error '4002', unable to search/add geo points. Invalid coordinates PHP

I’m not adding any geopoints. I’m merely updating a table that is related another table that contains a geopoint. (I’m not even touching the geopoint).

I have a PHP web service, it fetches a row from an Order table. Order table contains a related 1:1 customer (a User Class). A user class has a 1:M relation with a table called Address. And as you guessed, Address table has a geolocation column (1:1). All the relations have autoload on.

What happens is when I update the Order in the PHP web service, I get that 4002 error as mentioned in this post title. If I remove the geolocation from the related Address table, the update goes through just fine.

Why is that happening? Or what am I doing wrong?

note: even the geolocation column in the Address table has an autoload on. I need to have all the above relations mentioned with autoload on as my requirement.

Hi Salman,
It is difficult to say if you are doing something wrong or it is the problem on the server side.

Please provide us the file with the small example to reproduce your issue. You can send it to
Regards, Ilya

I have sent an email further explaining my issue in details, and also provided an example to reproduce this issue.

I’m looking forward to hear from you.

Hi Salman,

Thanks a lot for a demo sample! It really helped us to locate the problem.
As a temporary solution, I now may suggest you to change longitude and latitude properties in GeoPoint.php class to public (they’re protected now).
Meanwhile, we shall discuss the best solution in order to update the PHP-SDK on GitHub.

No problem! Thanks for the quick support! I’ll try do that.