json_decode does not properly decode with options parameter
| Bug #63737 | json_decode does not properly decode with options parameter | ||||
|---|---|---|---|---|---|
| Submitted: | 2012-12-11 11:03 UTC | Modified: | 2013-01-08 03:59 UTC | ||
| From: | googleguy@php.net | Assigned: | aharvey (profile) | ||
| Status: | Closed | Package: | JSON related | ||
| PHP Version: | 5.4.9 | OS: | |||
| Private report: | No | CVE-ID: | None | ||
[2012-12-11 11:03 UTC] googleguy@php.net
Description:
------------
json_decode does not properly decode JSON strings using options parameter.
Test script:
---------------
json_decode('12345678901234567890', false, 512, JSON_BIGINT_AS_STRING); // this won't work
However this will
json_decode('[12345678901234567890]', false, 512, JSON_BIGINT_AS_STRING);
Expected result:
----------------
string(20) "12345678901234567890"
Actual result:
--------------
float(1.2345678901235E+19)
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2012-12-11 11:04 UTC] aharvey@php.net
[2012-12-11 11:04 UTC] aharvey@php.net
-Status: Open +Status: Analyzed -Assigned To: +Assigned To: aharvey
[2012-12-11 12:04 UTC] aharvey@php.net
[2013-01-02 11:46 UTC] franssen dot roland at gmail dot com
[2013-01-02 20:18 UTC] googleguy@php.net
[2013-01-08 03:59 UTC] aharvey@php.net
[2013-01-08 03:59 UTC] aharvey@php.net