diff --git a/core/includes/theme.inc b/core/includes/theme.inc
index 5296b08..fa4caa8 100644
--- a/core/includes/theme.inc
+++ b/core/includes/theme.inc
@@ -1122,7 +1122,7 @@ function theme($hook, $variables = array()) {
 
   // restore path_to_theme()
   $theme_path = $temp;
-  return $output;
+  return (string) $output;
 }
 
 /**
