diff options
author | xue <> | 2007-12-20 01:25:40 +0000 |
---|---|---|
committer | xue <> | 2007-12-20 01:25:40 +0000 |
commit | cfad0a7fa9016af018cf65dad410acff9507dc80 (patch) | |
tree | 15712529ec4f9a781d156063e9980b3c4accbf9a /framework/Web | |
parent | 6ac31d8cf37e51fb85d1740212b6ed5e574ef570 (diff) |
fix for integer-indexed js encode.
Diffstat (limited to 'framework/Web')
-rw-r--r-- | framework/Web/Javascripts/TJavaScript.php | 2 |
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
|