Problem/Motivation

TypeError: get_class(): Argument #1 ($object) must be of type object, null given
in EntityStorageBase.php line 655

Steps to reproduce

  1. Create a workspace
  2. Create content inside the workspace
  3. Delete that content through another process
  4. Delete the workspace — error is thrown during purge

Problem code : WorkspaceManager.php line 364:

$associated_entity_storage->delete([$associated_entity_storage->load($initial_revision_ids[$revision_id])]);
load() returns null for a deleted entity, but nothing checks for that before calling delete().

Proposed resolution

$entity = $associated_entity_storage->load($initial_revision_ids[$revision_id]);
if ($entity) {
$associated_entity_storage->delete([$entity]);
}

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

Comments

gouthamraon created an issue.