Issue #2351589 by ultimike, penyaskito: Fixed Exception when a source has no destId.

8.0.x
Alex Pott 2014-10-27 09:09:50 +00:00
parent 6efeaf75d5
commit 3664535e9d
1 changed files with 5 additions and 4 deletions

View File

@ -155,10 +155,11 @@ abstract class SqlBase extends SourcePluginBase {
$map_key = 'sourceid' . $count;
$this->query->addField($alias, $map_key, "migrate_map_$map_key");
}
$n = count($this->migration->get('destinationIds'));
for ($count = 1; $count <= $n; $count++) {
$map_key = 'destid' . $count++;
$this->query->addField($alias, $map_key, "migrate_map_$map_key");
if ($n = count($this->migration->get('destinationIds'))) {
for ($count = 1; $count <= $n; $count++) {
$map_key = 'destid' . $count++;
$this->query->addField($alias, $map_key, "migrate_map_$map_key");
}
}
$this->query->addField($alias, 'source_row_status', 'migrate_map_source_row_status');
}