[php-src] Issue #13258: JSON_ERROR_DEPTH with JSON_PARTIAL_OUTPUT_ON_ERROR.

From: Date: Fri, 26 Jan 2024 21:28:10 +0000
Subject: [php-src] Issue #13258: JSON_ERROR_DEPTH with JSON_PARTIAL_OUTPUT_ON_ERROR.
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-246351@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/13258 Author: vituko ### Description Hi, json_encode, when it exceeds the max depth, having the flag JSON_PARTIAL_OUTPUT_ON_ERROR, just ignores the max depth and goes on. Shouldn't be a better choice to stop at that depth, replacing by null, for example, following the "partial output" sense as with JSON_ERROR_RECURSION? Ignoring the optional depth limit seems a bug and truncating the chain of references with null, giving a partial output seems natural. It seems a trivial change in the sources, thank you.

« previous php.bugs (#246351) next »