Issue #2883025 by pameeela, joachim, mradcliffe: Exception messages in FieldConfig::getFieldStorageDefinition() are inaccurate

(cherry picked from commit 1174006d30)
merge-requests/7413/head
Alex Pott 2024-04-06 12:53:53 +01:00
parent 27e8fd6aec
commit f9caeefc28
No known key found for this signature in database
GPG Key ID: BDA67E7EE836E5CE
1 changed files with 2 additions and 2 deletions

View File

@ -313,10 +313,10 @@ class FieldConfig extends FieldConfigBase implements FieldConfigInterface {
}
if (!$field_storage_definition) {
throw new FieldException("Attempted to create an instance of field with name {$this->field_name} on entity type {$this->entity_type} when the field storage does not exist.");
throw new FieldException("Attempted to create, modify or delete an instance of field with name {$this->field_name} on entity type {$this->entity_type} when the field storage does not exist.");
}
if (!$field_storage_definition instanceof FieldStorageConfigInterface) {
throw new FieldException("Attempted to create a configurable field of non-configurable field storage {$this->field_name}.");
throw new FieldException("Attempted to create, modify or delete a configurable field of non-configurable field storage {$this->field_name}.");
}
$this->fieldStorage = $field_storage_definition;
}