Projet

Général

Profil

Révision ee46a8ed

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

Update date 7.x-2.9 -> 7.x-2.10-rc1

Voir les différences:

drupal7/sites/all/modules/date/date_api/date_api_elements.inc
111 111
  $format = DATE_FORMAT_DATETIME;
112 112

  
113 113
  // The text and popup widgets might return less than a full datetime string.
114
  if (strlen($element['#default_value']) < 19) {
114
  if (is_string($element['#default_value']) && strlen($element['#default_value']) < 19) {
115 115
    switch (strlen($element['#default_value'])) {
116 116
      case 16:
117 117
        $format = 'Y-m-d H:i';
......
319 319

  
320 320
  $element['#tree'] = TRUE;
321 321
  $element['#theme_wrappers'] = array('date_text');
322
  $element['date']['#value'] = $element['#value']['date'];
322
  $element['date']['#value'] = isset($element['#value']['date']) ? $element['#value']['date'] : '';
323 323
  $element['date']['#type'] = 'textfield';
324 324
  $element['date']['#weight'] = !empty($element['date']['#weight']) ? $element['date']['#weight'] : $element['#weight'];
325 325
  $element['date']['#attributes'] = array('class' => isset($element['#attributes']['class']) ? $element['#attributes']['class'] += array('date-date') : array('date-date'));

Formats disponibles : Unified diff