joomla/joomla-cms — pull request #2429 by okonomiyaki3000 (2013-11-07 02:57:26+00:00)
Title: Save empty multi-value fields as empty array (instead of not at all).

Tracker: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=32564&start=0

This change first of all simplifies an unnecessarily verbose if/else block. That part of the change affects only code readability, there is no change whatsoever to functionality at this point.

Then, if the field handles multiple values but no value has been set, the value is set to empty array. This way, if the field has one or more default values but the user chooses to deselect them, the field will not reselect the default values when the form is loaded again in the future.