Skip to content

Some values are lost if an array contains both integers and strings as keys #95

Open
@hingst

Description

@hingst

Say you have three text inputs:

<input type="text" name="myname[0]">
<input type="text" name="myname[1]">
<input type="text" name="myname[stringkey]">

When serializing this form, the first two fields are lost in the resulting object. I think the reason is in lines 62 through 70. In the first two iterations myname is detected as "fixed" (line 64), while in the third iteration it's detected as "named" (line 69). This leads to the first two values being overwritten by the third.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions