diff options
author | xue <> | 2006-02-22 05:24:49 +0000 |
---|---|---|
committer | xue <> | 2006-02-22 05:24:49 +0000 |
commit | 45ddffcfc4ff5b732f9f39719430b461345c8f7a (patch) | |
tree | 59585f0102e7f40d3a1c3e7f7e1b910659743c35 /framework/Web/Javascripts/TJavaScript.php | |
parent | d7c8a56d49200cb46d94403934674d670035ff20 (diff) |
fixed an encoding bug in TJavaScript.
Diffstat (limited to 'framework/Web/Javascripts/TJavaScript.php')
-rw-r--r-- | framework/Web/Javascripts/TJavaScript.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/framework/Web/Javascripts/TJavaScript.php b/framework/Web/Javascripts/TJavaScript.php index 4a788b95..4066565b 100644 --- a/framework/Web/Javascripts/TJavaScript.php +++ b/framework/Web/Javascripts/TJavaScript.php @@ -125,14 +125,15 @@ class TJavaScript if($toMap)
{
foreach($value as $k=>$v)
- if(is_string($v) && strlen($v) > 0)
+ if($v!=='')
$results[]="'{$k}':".self::encode($v,$toMap);
return '{'.implode(',',$results).'}';
}
else
{
foreach($value as $k=>$v)
- $results[]=self::encode($v,$toMap);
+ if($v!=='')
+ $results[]=self::encode($v,$toMap);
return '['.implode(',',$results).']';
}
}
|