diff options
author | Jakub Zelenka <bukka@php.net> | 2016-08-24 20:46:33 +0100 |
---|---|---|
committer | Jakub Zelenka <bukka@php.net> | 2016-08-29 14:49:40 +0100 |
commit | 12a8c3f6e79ff159cce455ff9944a03aa70ff589 (patch) | |
tree | 5f5bb03fe55f4ef11d61d64ea6098b5245e788c8 /ext/json/json.c | |
parent | 0e709fe42d781209e955cf54d34e12361a784680 (diff) | |
download | php-git-12a8c3f6e79ff159cce455ff9944a03aa70ff589.tar.gz |
Add initial failure checking for json_encode
Diffstat (limited to 'ext/json/json.c')
-rw-r--r-- | ext/json/json.c | 4 |
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); } /* }}} */ |