summaryrefslogtreecommitdiff
path: root/includes/common.inc
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2013-08-05 02:12:57 -0400
committerDavid Rothstein <drothstein@gmail.com>2013-08-05 02:12:57 -0400
commit68f6a7c857d40cdf53bb344c974b1899f0fd3104 (patch)
tree4cbda0a120918b342c1b6339ddd54be131fb0ea2 /includes/common.inc
parentf019275be7d960060c682c69d462832fd53e02f2 (diff)
downloadbrdo-68f6a7c857d40cdf53bb344c974b1899f0fd3104.tar.gz
brdo-68f6a7c857d40cdf53bb344c974b1899f0fd3104.tar.bz2
Issue #1975442 by thedavidmeister, dcam: Fixed drupal_render() should always return a string.
Diffstat (limited to 'includes/common.inc')
-rw-r--r--includes/common.inc12
1 files changed, 6 insertions, 6 deletions
diff --git a/includes/common.inc b/includes/common.inc
index d2a36be2b..262e1c57b 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -5795,23 +5795,23 @@ function drupal_render_page($page) {
* array to be rendered independently and prevents them from being rendered
* more than once on subsequent calls to drupal_render() (e.g., as part of a
* larger array). If the same array or array element is passed more than once
- * to drupal_render(), it simply returns a NULL value.
+ * to drupal_render(), it simply returns an empty string.
*
- * @param $elements
+ * @param array $elements
* The structured array describing the data to be rendered.
*
- * @return
+ * @return string
* The rendered HTML.
*/
function drupal_render(&$elements) {
// Early-return nothing if user does not have access.
if (empty($elements) || (isset($elements['#access']) && !$elements['#access'])) {
- return;
+ return '';
}
// Do not print elements twice.
if (!empty($elements['#printed'])) {
- return;
+ return '';
}
// Try to fetch the element's markup from cache and return.
@@ -5847,7 +5847,7 @@ function drupal_render(&$elements) {
// Allow #pre_render to abort rendering.
if (!empty($elements['#printed'])) {
- return;
+ return '';
}
// Get the children of the element, sorted by weight.