Commit 3db18a9d authored by Dries's avatar Dries

- Patch #998612 by longwave: drupal_render() doesn't render 0 when set into #markup property.

parent ade0c248
......@@ -5569,9 +5569,9 @@ function drupal_render(&$elements) {
return $cached_output;
}
// If #markup is not empty, set #type. This allows to specify just #markup on
// an element without setting #type.
if (!empty($elements['#markup']) && !isset($elements['#type'])) {
// If #markup is set, ensure #type is set. This allows to specify just #markup
// on an element without setting #type.
if (isset($elements['#markup']) && !isset($elements['#type'])) {
$elements['#type'] = 'markup';
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment