Fixed bug that CJavaScript::encode was formatting floats in a wrong way during encoding

This commit is contained in:
Alexander Makarov
2013-07-08 21:43:42 +04:00
parent 2f79926d45
commit ba66359995
2 changed files with 2 additions and 1 deletions

View File

@@ -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();