summaryrefslogtreecommitdiff
path: root/ext/json/json.c
diff options
context:
space:
mode:
authorScott MacVicar <scottmac@php.net>2010-07-06 17:01:30 +0000
committerScott MacVicar <scottmac@php.net>2010-07-06 17:01:30 +0000
commite1ce0a64ea4d4f33f9de736a8b7dfcaf391ee053 (patch)
tree55a439e90b5317231d5b9bdccc2073a8e13efda2 /ext/json/json.c
parent336b5af34b91d64375010d3bf66a15512789ff60 (diff)
downloadphp-git-e1ce0a64ea4d4f33f9de736a8b7dfcaf391ee053.tar.gz
Fix bug #52262 - Invalid UTF-8 documents don't set an error code when they fail to decode.
Diffstat (limited to 'ext/json/json.c')
-rw-r--r--ext/json/json.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/json/json.c b/ext/json/json.c
index 09e874040a..38fd3aacfa 100644
--- a/ext/json/json.c
+++ b/ext/json/json.c
@@ -500,6 +500,7 @@ PHP_JSON_API void php_json_decode(zval *return_value, char *str, int str_len, ze
if (utf16) {
efree(utf16);
}
+ JSON_G(error_code) = PHP_JSON_ERROR_UTF8;
RETURN_NULL();
}