mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Add initial failure checking for json_encode
This commit is contained in:
parent
0e709fe42d
commit
12a8c3f6e7
3 changed files with 57 additions and 43 deletions
|
@ -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);
|
||||
}
|
||||
/* }}} */
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue