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

8.0.x
Dries Buytaert 2011-04-10 23:38:47 +02:00
parent ade0c24804
commit 3db18a9d19
1 changed files with 3 additions and 3 deletions

View File

@ -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';
}