diff --git a/core/modules/system/tests/modules/entity_test/entity_test.module b/core/modules/system/tests/modules/entity_test/entity_test.module index 4b022a3..ccb63c5 100644 --- a/core/modules/system/tests/modules/entity_test/entity_test.module +++ b/core/modules/system/tests/modules/entity_test/entity_test.module @@ -402,7 +402,9 @@ function entity_test_entity_test_insert($entity) { * Implements hook_entity_update(). */ function entity_test_entity_update(EntityInterface $entity) { - \Drupal::state()->set('entity_test.originalRevisionId', $entity->getOriginalRevisionId()); + if ($entity instanceof \Drupal\Core\Entity\OriginalRevisionIdInterface) { + \Drupal::state()->set('entity_test.originalRevisionId', $entity->getOriginalRevisionId()); + } } /**