Skip to content

Latest commit

 

History

History
44 lines (41 loc) · 927 Bytes

2021-07-16-add-strict-mode-for-list-fields.md

File metadata and controls

44 lines (41 loc) · 927 Bytes
title issue author
Add strict mode for list fields
NEXT-15170
Timo Altholtmann

Core

  • Added property strict to the Listfield. If set to true, the ListField->decode() will always return a non associative array.

Upgrade Information

ListField strict mode

A ListField will now always return a non associative array if the strict mode is true. This will be the default in 6.5.0. Please ensure that the data is saved as non associative array or switch to JsonField instead.

Valid listField before:

Array
(
    [0] => baz
    [foo] => bar
    [1] => Array
        (
            [foo2] => Array
                (
                    [foo3] => bar2
                )
        )
)

Valid ListField after:

Array
(
    [0] => baz
    [1] => bar
    [2] => Array
        (
            [foo2] => Array
                (
                    [foo3] => bar2
                )
        )
)