codelovers/asana-time-track

json_decode() floating problem

Opened this issue · 1 comments

For some id values (a workspace id in my case), we have a precision loss (on 32bits architectures) due to a cast to float by json_decode. Then, the id is corrupted and we can't go further.

One solution could be to use JSON_BIGINT_AS_STRING as an option to json_decode, but:
a. This would mean editing all calls to json_decode, as I don't think we can set it as a global option ;
b. This option is only available in PHP 5.4, which I don't think most people use.

What do you guys think? It's a pretty serious issue since it partially breaks the app on 32 bits installations.

+1 ?