Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save orakili/994448 to your computer and use it in GitHub Desktop.
Save orakili/994448 to your computer and use it in GitHub Desktop.
#1169180 - Drupal 7.x - Messaging 7.x-1.0-alpha1 - Element prerendering patch
diff --git messaging_template/messaging_template.module messaging_template/messaging_template.module
index 05eacf2..435a2d3 100644
--- messaging_template/messaging_template.module
+++ messaging_template/messaging_template.module
@@ -121,8 +121,10 @@ function messaging_template_pre_render_element($element) {
'#method' => $element['#method'],
);
foreach (element_children($element) as $index) {
- $element[$index] = $properties + $element[$index];
- $element[$index] = messaging_template_pre_render_element($element[$index]);
+ if (!empty($element[$index])) {
+ $element[$index] = $properties + $element[$index];
+ $element[$index] = messaging_template_pre_render_element($element[$index]);
+ }
}
return $element;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment