You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.