There is no error code set for json_last_error if an invalid utf8

sequence is encountered.  This fixes that.  Might be worthwhile to
merge to 5.3 despite the new constant.
This commit is contained in:
Rasmus Lerdorf 2009-07-22 21:32:58 +00:00
parent d1d69cc796
commit f0fb480b13
2 changed files with 4 additions and 0 deletions

View file

@ -24,6 +24,7 @@ enum error_codes {
PHP_JSON_ERROR_STATE_MISMATCH,
PHP_JSON_ERROR_CTRL_CHAR,
PHP_JSON_ERROR_SYNTAX,
PHP_JSON_ERROR_UTF8,
};
extern JSON_parser new_JSON_parser(int depth);