sameFormFieldsAsArray does not convert fields to arrays if all inputs are empty

Description

When sameFormFieldsAsArray is set to true, when all fields with the same name are empty, it's not converted to an array of empty strings (as expected). If only one of the fields is filled out, it's passed as a string, and the other empty strings are not passed as elements in an array. This broke portions of our application that had previously been working on 5.3.2+77.

It seems the fix that was added to correct didn't account for empty fields.

https://github.com/lucee/Lucee/blob/538a9c165f1a854e261b1f538d0dc113727eeebe/core/src/main/java/lucee/runtime/type/scope/ScopeSupport.java#L251

Updated the repro from the earlier issue to demonstrate: https://github.com/mjclemente/lucee-error-sameFormFieldsAsArray

Environment

CommandBox

Assignee

Michael Offner

Reporter

Matthew Clemente

Priority

New

Labels

Fix versions

None

Affects versions

Configure