diff -u b/core/modules/migrate/src/Plugin/migrate/process/Explode.php b/core/modules/migrate/src/Plugin/migrate/process/Explode.php --- b/core/modules/migrate/src/Plugin/migrate/process/Explode.php +++ b/core/modules/migrate/src/Plugin/migrate/process/Explode.php @@ -25,9 +25,9 @@ * {@inheritdoc} */ public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) { - if (is_string($value[0])) { + if (is_string($value)) { if (!empty($this->configuration['delimiter'])) { - return explode($this->configuration['delimiter'], $value[0]); + return explode($this->configuration['delimiter'], $value); } else { throw new MigrateException(sprintf('delimiter is empty', var_export($value, TRUE))); diff -u b/core/modules/migrate/tests/src/Unit/process/ExplodeTest.php b/core/modules/migrate/tests/src/Unit/process/ExplodeTest.php --- b/core/modules/migrate/tests/src/Unit/process/ExplodeTest.php +++ b/core/modules/migrate/tests/src/Unit/process/ExplodeTest.php @@ -48,7 +48,7 @@ public function testTransform() { $configuration['delimiter'] = '_'; $this->plugin = new Explode($configuration, 'explode', [], $this->moduleHandler->reveal(), $this->migrationPlugin->reveal()); - $source = ['color_bartik_stylesheets']; + $source = 'color_bartik_stylesheets'; $result = ['color', 'bartik', 'stylesheets']; $transformed_value = $this->plugin->transform($source, $this->migrateExecutable, $this->row, 'destinationproperty'); $this->assertSame($result, $transformed_value); @@ -63,7 +63,7 @@ public function testSourceString() { $configuration['delimiter'] = '_'; $this->plugin = new Explode($configuration, 'explode', [], $this->moduleHandler->reveal(), $this->migrationPlugin->reveal()); - $this->plugin->transform([ ['color_bartik_stylesheets'] ], $this->migrateExecutable, $this->row, 'destinationproperty'); + $this->plugin->transform(['color_bartik_stylesheets'], $this->migrateExecutable, $this->row, 'destinationproperty'); } /** @@ -75,7 +75,7 @@ public function testDelimiterEmpty() { $configuration['delimiter'] = ''; $this->plugin = new Explode($configuration, 'explode', [], $this->moduleHandler->reveal(), $this->migrationPlugin->reveal()); - $this->plugin->transform(['color_bartik_stylesheets'], $this->migrateExecutable, $this->row, 'destinationproperty'); + $this->plugin->transform('color_bartik_stylesheets', $this->migrateExecutable, $this->row, 'destinationproperty'); } }