sameFormFieldsAsArray converts all fields to arrays

Description

When sameFormFieldsAsArray is set to true in Application.cfc, all form fields are converted to arrays, not just those with the same name.

I set up a repro case here: https://github.com/mjclemente/lucee-error-sameFormFieldsAsArray

ACF handles this setting in the expected manner, only converting form fields to arrays if there is more than one with the same name.

Environment

I tested this with CommandBox.

Activity

Show:

Zac Spitzer 29 July 2019 at 17:10

Docs?

Pothys - MitrahSoft 13 May 2019 at 15:02

I've checked it & confirmed the issue happened on lucee. Checked it with ACF18 it returns only the array of fields with the same name only. Lucee returns all of the field value in array format. you're right it was missed from docs also.

Zac Spitzer 8 May 2019 at 21:07

Matthew Clemente 8 May 2019 at 19:34

FWIW, this was mentioned in the Lucee Lang forum about 2 years ago: https://dev.lucee.org/t/sameformfieldsasarray-setting-result-in-incorrect-results/2273

Fixed

Details

Assignee

Reporter

Priority

Fix versions

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Sprint

Affects versions

Created 8 May 2019 at 19:31
Updated 18 June 2023 at 17:00
Resolved 29 July 2019 at 17:09

Flag notifications