From 12a8c3f6e79ff159cce455ff9944a03aa70ff589 Mon Sep 17 00:00:00 2001 From: Jakub Zelenka Date: Wed, 24 Aug 2016 20:46:33 +0100 Subject: Add initial failure checking for json_encode --- ext/json/json.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'ext/json/json.c') 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); } /* }}} */ -- cgit v1.2.1