Updated: Comment #N
Problem/Motivation
When calling getPreparedFieldMapping() for a field which has no mappings defined in config, getPreparedFieldMapping() return an array like this:
<?php
array(4) {
["properties"]=>
NULL
["datatype"]=>
NULL
["datatype_callback"]=>
NULL
["mapping_type"]=>
NULL
}
?>
Proposed resolution
If $field_mapping['properties'] is empty, there is really no reason to return that array of empty keys. getPreparedFieldMapping() should check if $field_mapping['properties'] is empty and return NULL if so, like getFieldMapping().
Remaining tasks
patch
User interface changes
NA
API changes
The return value will have to be adjusted in the docs.