Projet

Général

Profil

Révision b4adf10d

Ajouté par Assos Assos il y a plus de 9 ans

Udpate to 7.33

Voir les différences:

drupal7/modules/field/field.crud.inc
60 60
  }
61 61
  // Field type is required.
62 62
  if (empty($field['type'])) {
63
    throw new FieldException('Attempt to create a field with no type.');
63
    throw new FieldException(format_string('Attempt to create field @field_name with no type.', array('@field_name' => $field['field_name'])));
64 64
  }
65 65
  // Field name cannot contain invalid characters.
66 66
  if (!preg_match('/^[_a-z]+[_a-z0-9]*$/', $field['field_name'])) {
67
    throw new FieldException('Attempt to create a field with invalid characters. Only lowercase alphanumeric characters and underscores are allowed, and only lowercase letters and underscore are allowed as the first character');
67
    throw new FieldException(format_string('Attempt to create a field @field_name with invalid characters. Only lowercase alphanumeric characters and underscores are allowed, and only lowercase letters and underscore are allowed as the first character', array('@field_name' => $field['field_name'])));
68 68
  }
69 69

  
70 70
  // Field name cannot be longer than 32 characters. We use drupal_strlen()

Formats disponibles : Unified diff