From b52edfa8f4463b61a4958b373a96a28caa02bdbc Mon Sep 17 00:00:00 2001
From: David Meister <thedavidmeister@gmail.com>
Date: Sun, 9 Jun 2013 02:18:37 +1000
Subject: [PATCH] 2012818-9

---
 core/includes/common.inc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/core/includes/common.inc b/core/includes/common.inc
index 00decfa..5469fab 100644
--- a/core/includes/common.inc
+++ b/core/includes/common.inc
@@ -4768,9 +4768,9 @@ function drupal_render(&$elements) {
     }
   }
 
-  // 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'])) {
+  // If #markup is set, ensure #type is set if #theme is not set. This allows us
+  // to specify just #markup on an element without setting #type.
+  if (isset($elements['#markup']) && !isset($elements['#type']) && !isset($elements['#theme'])) {
     $elements['#type'] = 'markup';
   }
 
-- 
1.7.11.1

