summaryrefslogtreecommitdiff
path: root/framework/Web/Javascripts
diff options
context:
space:
mode:
authorxue <>2007-12-20 01:25:40 +0000
committerxue <>2007-12-20 01:25:40 +0000
commitcfad0a7fa9016af018cf65dad410acff9507dc80 (patch)
tree15712529ec4f9a781d156063e9980b3c4accbf9a /framework/Web/Javascripts
parent6ac31d8cf37e51fb85d1740212b6ed5e574ef570 (diff)
fix for integer-indexed js encode.
Diffstat (limited to 'framework/Web/Javascripts')
-rw-r--r--framework/Web/Javascripts/TJavaScript.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/framework/Web/Javascripts/TJavaScript.php b/framework/Web/Javascripts/TJavaScript.php
index 228dc88f..17a8f39c 100644
--- a/framework/Web/Javascripts/TJavaScript.php
+++ b/framework/Web/Javascripts/TJavaScript.php
@@ -158,7 +158,7 @@ class TJavaScript
{
foreach($value as $k=>$v)
if($v!=='')
- $results[]="'{$k}':".self::encode($v,$toMap);
+ $results[]=(is_string($k)?"'{$k}':":'').self::encode($v,$toMap);
return '{'.implode(',',$results).'}';
}
else