Doc #65803 [NEW]: JSON errors missing a value
| From: | jsnell at e-normous dot com | Date: | Tue, 01 Oct 2013 19:14:33 +0000 |
| Subject: | Doc #65803 [NEW]: JSON errors missing a value | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-10351@lists.php.net to get a copy of this message | ||
From: jsnell at e-normous dot com
Operating system: n/a
PHP version: 5.5.4
Package: json
Bug Type: Documentation Problem
Bug description:JSON errors missing a value
Description:
------------
---
From manual page: http://www.php.net/function.json-last-error#refsect1-
function.json-last-error-returnvalues
---
JSON_ERROR_RECURSION is missing from the list of constants in
json_last_error()
The constant seems to be defined as 6 in my PHP build (PHP 5.5.3-1) and the
test
script returns a value of 6.
Test script:
---------------
$foo = new stdClass();
$bar = new stdClass();
$foo->bar = $bar;
$bar->foo = $foo;
var_dump(json_encode($foo));
var_dump(json_last_error());
int(6)
Recursion detected
Expected result:
----------------
JSON_ERROR_RECURSION would be defined on
http://www.php.net/function.json-last-
error
--
Edit bug report at https://bugs.php.net/bug.php?id=65803&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=65803&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=65803&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=65803&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=65803&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=65803&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=65803&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=65803&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=65803&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=65803&r=support
Expected behavior: https://bugs.php.net/fix.php?id=65803&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=65803&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=65803&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=65803&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=65803&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=65803&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=65803&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=65803&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=65803&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=65803&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=65803&r=mysqlcfg