From 45ddffcfc4ff5b732f9f39719430b461345c8f7a Mon Sep 17 00:00:00 2001 From: xue <> Date: Wed, 22 Feb 2006 05:24:49 +0000 Subject: fixed an encoding bug in TJavaScript. --- framework/Web/Javascripts/TJavaScript.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'framework/Web') 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).']'; } } -- cgit v1.2.3