diff --git a/core/lib/Drupal/Core/Entity/Sql/EntityTypeSchemaListenerTrait.php b/core/lib/Drupal/Core/Entity/Sql/EntityTypeSchemaListenerTrait.php index 2b8a46562d..5c40c43457 100644 --- a/core/lib/Drupal/Core/Entity/Sql/EntityTypeSchemaListenerTrait.php +++ b/core/lib/Drupal/Core/Entity/Sql/EntityTypeSchemaListenerTrait.php @@ -216,7 +216,7 @@ protected function copyData(EntityTypeInterface $entity_type, EntityTypeInterfac $this->handleEntityTypeSchemaUpdateExceptionOnDataCopy($entity_type, $original, $sandbox); // Re-throw the original exception with a helpful message. - $error_revision_id = !$load_revisions ?: ", revision ID: {$entity->getLoadedRevisionId()}"; + $error_revision_id = $load_revisions ? ", revision ID: {$entity->getLoadedRevisionId()}" : ''; throw new EntityStorageException("The entity update process failed while processing the entity type {$entity_type->id()}, ID: {$entity->id()}$error_revision_id.", $e->getCode(), $e); }