summaryrefslogtreecommitdiff
path: root/ext/json/json.c
diff options
context:
space:
mode:
authorJakub Zelenka <bukka@php.net>2016-08-24 20:46:33 +0100
committerJakub Zelenka <bukka@php.net>2016-08-29 14:49:40 +0100
commit12a8c3f6e79ff159cce455ff9944a03aa70ff589 (patch)
tree5f5bb03fe55f4ef11d61d64ea6098b5245e788c8 /ext/json/json.c
parent0e709fe42d781209e955cf54d34e12361a784680 (diff)
downloadphp-git-12a8c3f6e79ff159cce455ff9944a03aa70ff589.tar.gz
Add initial failure checking for json_encode
Diffstat (limited to 'ext/json/json.c')
-rw-r--r--ext/json/json.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/ext/json/json.c b/ext/json/json.c
index 2acfb5e79f..3bbe532d97 100644
--- a/ext/json/json.c
+++ b/ext/json/json.c
@@ -186,9 +186,7 @@ static PHP_MINFO_FUNCTION(json)
PHP_JSON_API int php_json_encode(smart_str *buf, zval *val, int options) /* {{{ */
{
- php_json_encode_zval(buf, val, options);
-
- return JSON_G(error_code) > 0 ? FAILURE : SUCCESS;
+ return php_json_encode_zval(buf, val, options);
}
/* }}} */