diff -u b/src/Plugin/migrate/process/EntityLookup.php b/src/Plugin/migrate/process/EntityLookup.php --- b/src/Plugin/migrate/process/EntityLookup.php +++ b/src/Plugin/migrate/process/EntityLookup.php @@ -216,13 +216,15 @@ case 'entity_reference': if (empty($this->lookupBundle)) { $handlerSettings = $fieldConfig->getSetting('handler_settings'); - $bundles = array_filter((array) $handlerSettings['target_bundles']); - if (count($bundles) == 1) { - $this->lookupBundle = reset($bundles); - } - // This was added in 8.1.x is not supported in 8.0.x. - elseif (!empty($handlerSettings['auto_create']) && !empty($handlerSettings['auto_create_bundle'])) { - $this->lookupBundle = reset($handlerSettings['auto_create_bundle']); + if (count($handlerSettings) > 0) { + $bundles = array_filter((array) $handlerSettings['target_bundles']); + if (count($bundles) == 1) { + $this->lookupBundle = reset($bundles); + } + // This was added in 8.1.x is not supported in 8.0.x. + elseif (!empty($handlerSettings['auto_create']) && !empty($handlerSettings['auto_create_bundle'])) { + $this->lookupBundle = reset($handlerSettings['auto_create_bundle']); + } } }