diff --git a/core/lib/Drupal/Core/Entity/ContentEntityForm.php b/core/lib/Drupal/Core/Entity/ContentEntityForm.php index 9e5bdf0..3e853bb 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityForm.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityForm.php @@ -282,7 +282,7 @@ public function updateFormLangcode($entity_type_id, EntityInterface $entity, arr * The entity updated with the submitted values. */ public function updateChangedTime(EntityInterface $entity) { - if ($entity->getEntityType()->entityClassImplements(EntityChangedInterface::class)) { + if ($entity instanceof EntityChangedInterface) { $entity->setChangedTime(REQUEST_TIME); } } diff --git a/core/modules/content_translation/src/Tests/ContentTranslationUITestBase.php b/core/modules/content_translation/src/Tests/ContentTranslationUITestBase.php index 5989051..21eda6b 100644 --- a/core/modules/content_translation/src/Tests/ContentTranslationUITestBase.php +++ b/core/modules/content_translation/src/Tests/ContentTranslationUITestBase.php @@ -600,7 +600,7 @@ public function doTestChangedTimeAfterSaveWithoutChanges() { $storage->resetCache([$this->entityId]); $entity = $storage->load($this->entityId); // Test only entities, which implement the EntityChangedInterface. - if ($entity->getEntityType()->entityClassImplements(EntityChangedInterface::class)) { + if ($entity instanceof EntityChangedInterface) { $changed_timestamp = $entity->getChangedTime(); $entity->save();