summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--includes/common.inc2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/common.inc b/includes/common.inc
index f87d9b6c5..ef000ecf5 100644
--- a/includes/common.inc
+++ b/includes/common.inc
@@ -1208,7 +1208,7 @@ function drupal_to_js($var) {
case 'object':
$output = array();
foreach ($var as $k => $v) {
- $output[] = $k .': '. drupal_to_js($v);
+ $output[] = drupal_to_js(strval($k)) .': '. drupal_to_js($v);
}
return '{ '. implode(', ', $output) .' }';
default: