Fixed bug #50224 where float without decimals were converted to integer when encode JSON#635
Fixed bug #50224 where float without decimals were converted to integer when encode JSON#635jrbasso wants to merge 2 commits intophp:PHP-5.4from
Conversation
ext/json/json.c
Outdated
There was a problem hiding this comment.
Why strstr and not strchr? strchr should be faster.
There was a problem hiding this comment.
Good idea. Replaced.
Thanks to @smalyshev for the tip.
|
This patch breaks these tests: bug40503.phpt, json_encode_basic.phpt, pass001.1.phpt. The last one worries me the most - I'm not sure putting .0 there is really that good an idea... But in any case tests should pass. I'd recommend to do pull against master so that unit tests could run, when needed, it can be retargeted to suitable branch. |
|
Technically the tests were hiding this bug before because the encoding/decoding wasn't giving a symmetric value (ie, Are you suggesting to retarget this PR to master because the backward compatibility or just to have a testing tool checking it? |
|
@jrbasso all pulls should be targeted to master, unless they fix something unique to particular version. The dev merging them will then apply them to appropriate version. |
|
Got it. I will open a new PR targeting master. Thanks. |
No description provided.