Doc #52313 [NEW]: Missing JSON_ERROR_STATE_MISMATCH in json_last_error() documentation
| From: | jerome dot auge at anakeen dot com | Date: | Mon, 12 Jul 2010 08:51:26 +0000 |
| Subject: | Doc #52313 [NEW]: Missing JSON_ERROR_STATE_MISMATCH in json_last_error() documentation | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-4677@lists.php.net to get a copy of this message | ||
From:
Operating system:
PHP version: 5.3.2
Package: Documentation problem
Bug Type: Documentation Problem
Bug description:Missing JSON_ERROR_STATE_MISMATCH in json_last_error() documentation
Description:
------------
The json_last_error() documentation lacks the JSON_ERROR_STATE_MISMATCH
constant
in the list of possible returned values.
Test script:
---------------
The error code '2' returned by a json_decode() of a malformed JSON string
(Ex. '{"foo":"bar"}}' with double '}' at end) is not known
by the constants
shown in the documentation.
A glimpse in the source code, shows that there is another constant
'JSON_ERROR_STATE_MISMATCH' that matches the error code '2'.
Expected result:
----------------
--8<--
JSON_ERROR_NONE No error has occurred
JSON_ERROR_DEPTH The maximum stack depth has been exceeded
JSON_ERROR_STATE_MISMATCH Invalid or malformed JSON
JSON_ERROR_CTRL_CHAR Control character error, possibly incorrectly encoded
JSON_ERROR_SYNTAX Syntax error
JSON_ERROR_UTF8 Malformed UTF-8 characters, possibly incorrectly encoded
PHP 5.3.1
-->8--
--
Edit bug report at http://bugs.php.net/bug.php?id=52313&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52313&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52313&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52313&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=52313&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52313&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=52313&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=52313&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=52313&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=52313&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=52313&r=support
Expected behavior: http://bugs.php.net/fix.php?id=52313&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=52313&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=52313&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=52313&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52313&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=52313&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=52313&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=52313&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=52313&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=52313&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=52313&r=mysqlcfg