Currently there is way too much boilerplate for each target callback.
This patch allows every target callback to assume that incoming values are an array so that each target doesn't have to check. This should be backwards compatible unless there are targets out in the wild that assume the value is singular. While that's possible, it assumes knowledge of the source and that's technically incorrect.
For most targets, cardinality checking is removed. Cardinality is fixed by field.module automatically, so it's useless for the most part. The exceptions to this are taxonomy and file. Those targets are particularly expensive, so they shouldn't to more processing than necessary.
This patch also adds a new callback in the mapping array called 'post_process'. This allows us to remove empty value checking from field targets and move it to a separate step. That way, we can easily re-use _field_filter_items() that magically filters empty values.
|PASSED: [[SimpleTest]]: [MySQL] 5,107 pass(es).|
|FAILED: [[SimpleTest]]: [MySQL] 4,855 pass(es), 1 fail(s), and 1 exception(s).|
|FAILED: [[SimpleTest]]: [MySQL] 4,941 pass(es), 8 fail(s), and 0 exception(s).|