mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
MFH: use E_WARNING on recursion and add null to the result to keep it valid
This commit is contained in:
parent
60720d285f
commit
3003cd2473
4 changed files with 11 additions and 4 deletions
|
@ -136,7 +136,8 @@ static void json_encode_array(smart_str *buf, zval **val TSRMLS_DC) {
|
|||
}
|
||||
|
||||
if (myht && myht->nApplyCount > 1) {
|
||||
php_error_docref(NULL TSRMLS_CC, E_RECOVERABLE_ERROR, "recursion detected");
|
||||
php_error_docref(NULL TSRMLS_CC, E_WARNING, "recursion detected");
|
||||
smart_str_appendl(buf, "null", 4);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue