fuel/core — Issue #560: Duplicate keys for Fieldset_Field set_options inconsistency
Author: phil-lavin
Created: 2011-10-10 08:19:34+00:00
State: open

There's an inconsistency in the way Fieldset_Field adds options. Because it uses Arr::merge() numeric keys are appended if they already exist whereas string keys are replaced. This causes inconsistent behaviour. It means you can have duplicate
values if they pass an is_int() check but you can't if you have string values.

It is probably desirable that the field supports duplicate values, regardless of type, as these are valid and useful in HTML.

I didn't want to spend any time proposing a fix for this as I am unsure of your intentions for the workings of this field.