Commit 5f1381ef authored by catch's avatar catch
Browse files

Issue #1294264 by budda, davidwhthomas: FieldUpdateForbiddenException: Cannot...

Issue #1294264 by budda, davidwhthomas: FieldUpdateForbiddenException: Cannot update a list field - better debug info.
parent 9235ea17
......@@ -345,7 +345,7 @@ function list_field_update_forbid($field, $prior_field, $has_data) {
// Forbid any update that removes allowed values with actual data.
$lost_keys = array_diff(array_keys($prior_field['settings']['allowed_values']), array_keys($field['settings']['allowed_values']));
if (_list_values_in_use($field, $lost_keys)) {
throw new FieldUpdateForbiddenException(t('Cannot update a list field to not include keys with existing data.'));
throw new FieldUpdateForbiddenException(t('A list field (@field_name) with existing data cannot have its keys changed.', array('@field_name' => $field['field_name'])));
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment