X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Fmigrate%2Fsrc%2FMigrateExecutable.php;fp=web%2Fcore%2Fmodules%2Fmigrate%2Fsrc%2FMigrateExecutable.php;h=15abe8b729f591cf4e007230291d279d96dadbb3;hp=d5b9d1ac266026175e4a9c8de71b2e90f08585d0;hb=0bf8d09d2542548982e81a441b1f16e75873a04f;hpb=74df008bdbb3a11eeea356744f39b802369bda3c diff --git a/web/core/modules/migrate/src/MigrateExecutable.php b/web/core/modules/migrate/src/MigrateExecutable.php index d5b9d1ac2..15abe8b72 100644 --- a/web/core/modules/migrate/src/MigrateExecutable.php +++ b/web/core/modules/migrate/src/MigrateExecutable.php @@ -221,7 +221,9 @@ class MigrateExecutable implements MigrateExecutableInterface { if ($save) { try { $this->getEventDispatcher()->dispatch(MigrateEvents::PRE_ROW_SAVE, new MigratePreRowSaveEvent($this->migration, $this->message, $row)); - $destination_id_values = $destination->import($row, $id_map->lookupDestinationId($this->sourceIdValues)); + $destination_ids = $id_map->lookupDestinationIds($this->sourceIdValues); + $destination_id_values = $destination_ids ? reset($destination_ids) : []; + $destination_id_values = $destination->import($row, $destination_id_values); $this->getEventDispatcher()->dispatch(MigrateEvents::POST_ROW_SAVE, new MigratePostRowSaveEvent($this->migration, $this->message, $row, $destination_id_values)); if ($destination_id_values) { // We do not save an idMap entry for config.