mirror of
https://github.com/yiisoft/yii.git
synced 2026-03-05 07:44:05 +01:00
Fixed bug that CJavaScript::encode was formatting floats in a wrong way during encoding
This commit is contained in:
@@ -78,7 +78,7 @@ class CJavaScript
|
||||
elseif($value===INF)
|
||||
return 'Number.POSITIVE_INFINITY';
|
||||
else
|
||||
return rtrim(sprintf('%.16F',$value),'0'); // locale-independent representation
|
||||
return str_replace(',','.',(float)$var); // locale-independent representation
|
||||
}
|
||||
elseif($value instanceof CJavaScriptExpression)
|
||||
return $value->__toString();
|
||||
|
||||
Reference in New Issue
Block a user