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
commitbc74861cf82283c04a810bf306667e38dded4afb (patch)
tree40b8d2f305a4a3b8b09dbad1f97c5a11d46afb7f /ext/json/json.c
parent8054458fb84119439959c7928dca26ca701212ba (diff)
downloadphp-git-bc74861cf82283c04a810bf306667e38dded4afb.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 667774a911..e740415ab2 100644
--- a/ext/json/json.c
+++ b/ext/json/json.c
@@ -560,6 +560,7 @@ PHP_JSON_API void php_json_decode_ex(zval *return_value, char *str, int str_len,
if (utf16) {
efree(utf16);
}
+ JSON_G(error_code) = PHP_JSON_ERROR_UTF8;
RETURN_NULL();
}