Doc #65803 [Opn->Csd]: JSON errors missing a value

From: Date: Tue, 01 Oct 2013 19:51:23 +0000
Subject: Doc #65803 [Opn->Csd]: JSON errors missing a value
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-10352@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=65803&edit=1 ID: 65803 Updated by: aharvey@php.net Reported by: jsnell at e-normous dot com Summary: JSON errors missing a value -Status: Open +Status: Closed Type: Documentation Problem -Package: json +Package: Documentation problem Operating System: n/a PHP Version: 5.5.4 -Assigned To: +Assigned To: aharvey Block user comment: N Private report: N New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Previous Comments: ------------------------------------------------------------------------ [2013-10-01 19:51:11] aharvey@php.net Automatic comment from SVN on behalf of aharvey Revision: http://svn.php.net/viewvc/?view=revision&revision=331633 Log: Document the new JSON error constants in PHP 5.5, since the naughty person who implemented them didn't add them to UPGRADING. :) Fixes doc bug #65803 (JSON errors missing a value). ------------------------------------------------------------------------ [2013-10-01 19:14:33] jsnell at e-normous dot com 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 this bug report at https://bugs.php.net/bug.php?id=65803&edit=1

« previous php.doc.bugs (#10352) next »