Steps to reproduce:

1. Create a new Drupal installation with Feeds, Feeds Tamper, and dependencies.
2. Create a node importer (CSV), with a title field.
3. Make the title field required w/ Feeds Tamper.
4. Import a CSV.

The "Required Field" plugin does not have any settings, line 67 of feeds_tamper.module (as well as lines 60 and 64) assumes that the settings piece will be there:

<?php
          if ($is_array && $plugin['multi'] == 'loop') {
            foreach ($item[$element_key] as &$i) {
              $plugin['callback']($source, $item_key, $element_key, $i, $instance->settings);
            }
          }
          elseif ($is_array && $plugin['multi'] == 'direct') {
            $plugin['callback']($source, $item_key, $element_key, $item[$element_key], $instance->settings);
          }
          elseif (!$is_array && $plugin['single'] != 'skip') {
            $plugin['callback']($source, $item_key, $element_key, $item[$element_key], $instance->settings);
          }
?>
CommentFileSizeAuthor
#1 feeds_tamper-2052983-1.patch693 bytesm.stenta
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

m.stenta’s picture

FileSize
693 bytes

Attached is a patch that fixes the issue in both D7 and D6 branches of Feeds Tamper.

m.stenta’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Active » Needs review
twistor’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.