Warning during rollback

Created on 15 April 2013, about 12 years ago
Updated 4 May 2025, 2 months ago

When rolling back product_type migration get the warning:
"Warning: Creating default object from empty value in MigrateDestinationCommerceProductType->prepareRollback() (line 121..."

This is due to:

  public function prepareRollback($product_type) {
    $migration = Migration::currentMigration();
    $entity->migrate = array(
      'machineName' => $migration->getMachineName(),
    );

    // Then call any prepare handler for this specific Migration.
    if (method_exists($migration, 'prepareRollback')) {
      $migration->prepareRollback($product_type);
    }
  }

What is $entity here supposed to refer to? I don't see how anything can happen other than 1) a warning 2) that line not really doing anything as entity is then never passed anywhere or usable anywhere else

πŸ› Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States peterjtracey

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024