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
Make var_export/debug_zval_dump first check for infinite recursion on the object
This test case previously failed with an assertion error in debug builds
(for updating an index of the array to set it to the same value it already had)
Then repeat the existing check on the return value of `get_properties_for`
in case there was a reason for doing it that way.
1. `HT_ASSERT_RC1(ht);` would fail for SplFixedArray and related
datastructures.
2. In order for a native datastructure to correctly implement
`*get_properties_for` for var_export's cycle detection,
it would need to return the exact same array every time prior to this PR.
This would prevent SplFixedArray or similar classes from returning a
temporary array that:
1. Wouldn't be affected by unexpected mutations from error handlers
2. Could be garbage collected instead.
Note that SplFixedArray continues to need to return `object->properties`
until php 9.0, when dynamic properties are forbidden.
(GitHub wasn't updating the previous PR despite pushing the branch
to the right repo earlier, creating a new branch)
ClosesGH-8044
0 commit comments