diff options
author | Scott MacVicar <scottmac@php.net> | 2011-02-09 08:05:00 +0000 |
---|---|---|
committer | Scott MacVicar <scottmac@php.net> | 2011-02-09 08:05:00 +0000 |
commit | 9b567fea6a68225ef0ba651956e91e97edf8d92e (patch) | |
tree | f52a0b61e6af61ab05f7b4acf70211b73d14cf21 /ext/json/JSON_parser.c | |
parent | 5fad615ff5a5d18f7b0d1dea9a8b4ed21a837c20 (diff) | |
download | php-git-9b567fea6a68225ef0ba651956e91e97edf8d92e.tar.gz |
Fix Bug #53963, error code isn't always set in certain error cases.
Diffstat (limited to 'ext/json/JSON_parser.c')
-rw-r--r-- | ext/json/JSON_parser.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/json/JSON_parser.c b/ext/json/JSON_parser.c index 259b77b084..ec07a4803d 100644 --- a/ext/json/JSON_parser.c +++ b/ext/json/JSON_parser.c @@ -656,6 +656,7 @@ parse_JSON(JSON_parser jp, zval *z, unsigned short utf16_json[], int length, int /* fall through if not IS_STRING */ default: FREE_BUFFERS(); + jp->error_code = PHP_JSON_ERROR_SYNTAX; return false; } break; @@ -695,6 +696,7 @@ parse_JSON(JSON_parser jp, zval *z, unsigned short utf16_json[], int length, int break; default: FREE_BUFFERS(); + jp->error_code = PHP_JSON_ERROR_SYNTAX; return false; } buf.len = 0; |