Commit c00aa71d authored by solideogloria's avatar solideogloria Committed by Damien McKenna
Browse files

Issue #3159420 by solideogloria, DamienMcKenna: Fatal error: Date theme...

Issue #3159420 by solideogloria, DamienMcKenna: Fatal error: Date theme functions passing invalid attributes to theme().
parent 27ffbb88
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -15,6 +15,8 @@ Date 7.x-2.x-dev, xxxx-xx-xx
  deprecated.
#3248357 by danwonac, solideogloria, DamienMcKenna: date_popup time broken after
  updating to 7.x-3.0-alpha1.
#3159420 by solideogloria, DamienMcKenna: Fatal error: Date theme functions
  passing invalid attributes to theme().


Date 7.x-2.12, 2021-10-07
+12 −3
Original line number Diff line number Diff line
@@ -17,7 +17,10 @@ function theme_date_timezone($variables) {
  if (isset($element['#children'])) {
    $element['#children'] = '<div id="' . $element['#id'] . '" ' . drupal_attributes($wrapper_attributes) . '>' . $element['#children'] . '</div>';
  }
  return '<div ' . drupal_attributes($attributes) . '>' . theme('form_element', $element) . '</div>';
  // Theme the element before calling drupal_attributes(), which modifies
  // $element['#wrapper_attributes'].
  $return = theme('form_element', $element);
  return '<div ' . drupal_attributes($attributes) . '>' . $return . '</div>';
}

/**
@@ -34,7 +37,10 @@ function theme_date_select($variables) {
  if (isset($element['#children'])) {
    $element['#children'] = '<div id="' . $element['#id'] . '" ' . drupal_attributes($wrapper_attributes) . '>' . $element['#children'] . '</div>';
  }
  return '<div ' . drupal_attributes($attributes) . '>' . theme('form_element', $element) . '</div>';
  // Theme the element before calling drupal_attributes(), which modifies
  // $element['#wrapper_attributes'].
  $return = theme('form_element', $element);
  return '<div ' . drupal_attributes($attributes) . '>' . $return . '</div>';
}

/**
@@ -55,7 +61,10 @@ function theme_date_text($variables) {
  if (isset($element['#children'])) {
    $element['#children'] = '<div id="' . $element['#id'] . '" ' . drupal_attributes($wrapper_attributes) . '>' . $element['#children'] . '</div>';
  }
  return '<div ' . drupal_attributes($attributes) . '>' . theme('form_element', $element) . '</div>';
  // Theme the element before calling drupal_attributes(), which modifies
  // $element['#wrapper_attributes'].
  $return = theme('form_element', $element);
  return '<div ' . drupal_attributes($attributes) . '>' . $return . '</div>';
}

/**
+4 −1
Original line number Diff line number Diff line
@@ -840,7 +840,10 @@ function theme_date_popup($vars) {
  if (isset($element['#children'])) {
    $element['#children'] = '<div id="' . $element['#id'] . '" ' . drupal_attributes($wrapper_attributes) . '>' . $element['#children'] . '</div>';
  }
  return '<div ' . drupal_attributes($attributes) . '>' . theme('form_element', $element) . '</div>';
  // Theme the element before calling drupal_attributes(), which modifies
  // $element['#wrapper_attributes'].
  $return = theme('form_element', $element);
  return '<div ' . drupal_attributes($attributes) . '>' . $return . '</div>';
}

/**