Skip to content
Snippets Groups Projects
Commit 7aa1963a authored by Neil Drumm's avatar Neil Drumm :wave:
Browse files

#64583 by Jaza, Themed form element output of '0' does not get printed.

parent 134314a3
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -524,13 +524,13 @@ function form_render(&$elements) {
unset($elements['#prefix'], $elements['#suffix']);
}
/* render each of the children using form_render and concatenate them */
if (!$content) {
if (!isset($content) || $content === '') {
foreach ($children as $key) {
$content .= form_render($elements[$key]);
}
}
}
if ($content) {
if (isset($content) && $content !== '') {
$elements['#children'] = $content;
}
......@@ -540,7 +540,7 @@ function form_render(&$elements) {
$elements['#printed'] = TRUE;
}
if ($content) {
if (isset($content) && $content !== '') {
$prefix = isset($elements['#prefix']) ? $elements['#prefix'] : '';
$suffix = isset($elements['#suffix']) ? $elements['#suffix'] : '';
return $prefix . $content . $suffix;
......
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