Commit 30c610bb authored by Dan Flanagan's avatar Dan Flanagan Committed by Dan Flanagan
Browse files

Issue #3292545 by danflanagan8: Migrate Sandbox has php8.1 problem with explode

parent a08cb18b
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -187,10 +187,16 @@ class MigrateSandboxForm extends ConfigFormBase {
      '#default_value' => $default_destination,
      '#description' => $this->t('Either way, the result is stored only temporarily. No entity will be saved.'),
    ];
    if (is_array($this->config('migrate_sandbox.latest')->get('destination.plugin'))) {
      $entity_type_default = explode(':', $this->config('migrate_sandbox.latest')->get('destination.plugin'))[1] ?? 'node';
    }
    else {
      $entity_type_default = 'node';
    }
    $form['destination_wrapper']['entity_type'] = [
      '#type' => 'textfield',
      '#title' => $this->t('Entity type (e.g. node or taxonomy_term)'),
      '#default_value' => explode(':', $this->config('migrate_sandbox.latest')->get('destination.plugin'))[1] ?? 'node',
      '#default_value' => $entity_type_default,
      '#states' => [
        'visible' => [
          ':input[name="destination"]' => ['value' => 'entity'],