diff --git a/core/modules/migrate/src/Plugin/migrate/process/Substr.php b/core/modules/migrate/src/Plugin/migrate/process/Substr.php index 8ebc98c..fe99e59 100644 --- a/core/modules/migrate/src/Plugin/migrate/process/Substr.php +++ b/core/modules/migrate/src/Plugin/migrate/process/Substr.php @@ -23,6 +23,11 @@ class Substr extends ProcessPluginBase { * {@inheritdoc} */ public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) { + // Don't fail if $value is NULL. For instance during a stub-migration. + if (is_null($value)) { + return $value; + } + $start = isset($this->configuration['start']) ? $this->configuration['start'] : 0; if (!is_int($start)) { throw new MigrateException('The start position configuration value should be an integer. Omit this key to capture from the beginning of the string.');