I have seen different descriptions of this bug in other topics,
but apparently in 3.24a it showed up again.
When working in JSON input mode, navigating to a nested array and using json_foreach will return the selected elements of that array correctly. However, after json_foreach_end the current pointer jumps to the root of the JSON data instead of the expected behavior of going up one level to the json object where said array is nested.
What I found additionally (and could not find any mentions of) is that if immediately after json_foreach_end a json_unselect_object is added, the pointer now acts as if it were where it should be -one level above the target nested array- and so moves to the 2nd level above the nested array.
So there are 2 positions for the current pointer after json_foreach_end? Is there some kind of memory leak that causes this situation?
This behavior has been reported as a bug before -and reported as fixed; so I am reporting it again, with my findings.
Can you provide a minimal example which shows the two issues you've mentioned. I'm not sure if it's the same as in the topics you've linked to and it's always hard to debug those without a concrete example.
I will be sending you via direct message an example script in which I was able to replicate the issues, along with some details of what I intended the script to do to get those results.
Oh, and the 2nd quote I mentioned in the previous post wasn't referring the reported bug where it was from, but to the specific line
I sent an example script the same day I wrote the post about it; and Florian has received and tested it for the issue.
I've also sent a message with suggestions on how to minimize the impact the issue causes, but for some reason haven't received a reply (this was on March 23rd).
I'm assuming he either hasn't noticed or has been too busy to reply; and I'm also guessing that is the same reason why the status of this bug report is still bug-awaiting-feedback.