You are here

protected function FeedsItem::prepareValue in Feeds 8.3

Prepares a single value.

Parameters

int $delta: The field delta.

array $values: The values.

Overrides FieldTargetBase::prepareValue

File

src/Feeds/Target/FeedsItem.php, line 50

Class

FeedsItem
Defines a feeds_item field mapper.

Namespace

Drupal\feeds\Feeds\Target

Code

protected function prepareValue($delta, array &$values) {
  if (isset($values['url']) && empty($values['url'])) {

    // If 'url' is empty, set it explicitly to NULL to prevent validation
    // errors.
    $values['url'] = NULL;
  }
}