Problem/Motivation

If you dont have empty list of xmls for import by using MigrateSourceMultiItems

  /**
   * Implementation of MigrateSource::performRewind().
   *
   * @return void
   */
  public function performRewind() {
    // If there isn't a specific ID list passed in, get it from the list class.
    if ($this->idList) {
      $this->idsToProcess = $this->idList;
    }
    else {
      $this->idsToProcess = $this->itemsClass->getIdList();
    }
    $this->idIterator = ($this->idsToProcess instanceof Iterator) ?
      $this->idsToProcess : new ArrayIterator($this->idsToProcess);
    $this->idIterator->rewind();
  }

Proposed resolution

patch

Comments

Chewie created an issue. See original summary.

chewie’s picture

chewie’s picture

Status: Active » Needs review
chewie’s picture

Title: Migration failed with source plugin exception: Passed variable is not an array or object, using empty array instead, in /space/www/www.vodfactory.com/data/releases/20150903072942/sites/all/modules/contrib/migrate/plugins/sources/multiitems.inc:163 » Migration failed with source plugin exception: Passed variable is not an array or object, using empty array instead, in migrate/plugins/sources/multiitems.inc:163
mikeryan’s picture

Title: Migration failed with source plugin exception: Passed variable is not an array or object, using empty array instead, in migrate/plugins/sources/multiitems.inc:163 » Handle empty idlist in MigrateSourceMultiItems

  • mikeryan committed 6c1a52a on 7.x-2.x authored by Chewie
    Issue #2565043 by Chewie: Handle empty idlist in MigrateSourceMultiItems
    
mikeryan’s picture

Assigned: chewie » Unassigned
Status: Needs review » Fixed

Committed, thanks!

Status: Fixed » Closed (fixed)

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