Skip to content
Snippets Groups Projects
Commit d04b6596 authored by Gerhard Killesreiter's avatar Gerhard Killesreiter
Browse files

#60797, theme('taxonomy_term_select', $element) called, but output is ignored, patch by chx

parent f16b6b29
No related branches found
No related tags found
No related merge requests found
......@@ -496,8 +496,8 @@ function form_render(&$elements) {
}
$content = '';
uasort($elements, "_form_sort");
if (!isset($elements['#children'])) {
$children = element_children($elements);
/* Render all the children that use a theme function */
if (isset($elements['#theme']) && !$elements['#theme_used']) {
$elements['#theme_used'] = TRUE;
......@@ -511,12 +511,15 @@ function form_render(&$elements) {
$elements['#value'] = $previous_value;
$elements['#type'] = $previous_type;
// if we rendered a single element, then we will skip the renderer
if (empty($children)) {
$elements['#printed'] = TRUE;
}
unset($elements['#prefix'], $elements['#suffix']);
}
/* render each of the children using form_render and concatenate them */
if (!$content) {
foreach (element_children($elements) as $key) {
foreach ($children as $key) {
$content .= form_render($elements[$key]);
}
}
......@@ -525,7 +528,7 @@ function form_render(&$elements) {
$elements['#children'] = $content;
}
/* Call the form element renderer */
// Until now, we rendered the children, here we render the element itself
if (!isset($elements['#printed'])) {
$content = theme(($elements['#type']) ? $elements['#type']: 'markup', $elements);
$elements['#printed'] = TRUE;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment