diff --git a/feeds_et.mappers.inc b/feeds_et.mappers.inc index 8beccbf..48584af 100644 --- a/feeds_et.mappers.inc +++ b/feeds_et.mappers.inc @@ -67,9 +67,17 @@ function _feeds_et_text_feeds_set_target($source, $entity, $target, $value) { function _feeds_et_field_feeds_set_target($source, $entity, $target, $value, $input_format = FALSE, $language_code = LANGUAGE_NONE) { // Check if entity translated field exists to also save empty field value. if (!isset($entity->{$target}[$language_code])) { - if (empty($value) || (is_array($value) && empty(reset($value)))) { + if (empty($value)) { return; } + // Also check for emptiness of first value of an array + // passed in as the value. + elseif (is_array($value)) { + $first_array_value = reset($value); + if (empty($first_array_value)) { + return; + } + } } if ($input_format) {