summaryrefslogtreecommitdiff
path: root/ext/json/JSON_parser.c
diff options
context:
space:
mode:
authorScott MacVicar <scottmac@php.net>2011-02-09 08:05:00 +0000
committerScott MacVicar <scottmac@php.net>2011-02-09 08:05:00 +0000
commit18b7f018e369977069a3cf27ee483a709a9ecb4e (patch)
tree9caf7b0d84cc2c4d2cd381868f62c086efcb326f /ext/json/JSON_parser.c
parentefa9a8ee53e279df568727781ebf6af42af9ec24 (diff)
downloadphp-git-18b7f018e369977069a3cf27ee483a709a9ecb4e.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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/json/JSON_parser.c b/ext/json/JSON_parser.c
index ef05f3b43c..dd832a7cbd 100644
--- a/ext/json/JSON_parser.c
+++ b/ext/json/JSON_parser.c
@@ -673,6 +673,7 @@ parse_JSON_ex(JSON_parser jp, zval *z, unsigned short utf16_json[], int length,
/* fall through if not IS_STRING */
default:
FREE_BUFFERS();
+ jp->error_code = PHP_JSON_ERROR_SYNTAX;
return false;
}
break;
@@ -712,6 +713,7 @@ parse_JSON_ex(JSON_parser jp, zval *z, unsigned short utf16_json[], int length,
break;
default:
FREE_BUFFERS();
+ jp->error_code = PHP_JSON_ERROR_SYNTAX;
return false;
}
buf.len = 0;