* convert int to string in the function js::set().

This commit is contained in:
wangyidong
2013-06-26 03:39:36 +00:00
parent 6e558f73ba
commit c43eec4a20

View File

@@ -815,6 +815,16 @@ EOT;
}
elseif(is_array($value) or is_object($value) or is_string($value))
{
if(is_array($value) or is_object($value))
{
$newValue = array();
foreach($value as $k => $v)
{
$newValue[$k] = is_numeric($v) ? (string)$v : $v;
}
$value = $newValue;
}
$value = json_encode($value);
$js .= "$key = $value";
}