neos / neos-development-collection

The unified repository containing the Neos core packages, used for Neos development.
https://www.neos.io/
GNU General Public License v3.0
260 stars 220 forks source link

BUGFIX: Fix handling of unset/nulled DataStructure keys #5033

Closed bwaidelich closed 1 month ago

bwaidelich commented 2 months ago

Re-establishes the Neos < 8.0 behavior of removed/nulled data structure keys

Background:

With #3645 a lot of Fusion core logic was refactored. As an unwanted side-effect, Neos.Fusion:DataStructure prototypes (effectively all implementations of the AbstractArrayFusionObject) now behave differently when it comes to removed or nulled keys and

Neos.Fusion:DataStructure {
    someProperty >
}

led to an array with:

{"someProperty":[]}

in Neos 8.0+.

This fix reverts this side-effect, making the above return

[]

again.

Fixes: #3859 Related: #3577, #3646