diff --git a/CHANGELOG b/CHANGELOG index d5fb54c5e..552c7331d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -4,6 +4,7 @@ Version 1.1.14 work in progress ------------------------------- - Bug: There was unnecessary echo in CRUD views generated by Gii (samdark) +- Bug: CJavaScript::encode was formatting floats in a wrong way during encoding (samdark) - Bug #101: CActiveFinder::buildJoinTree() no longer uses 'false' for 'select' value (klimov-paul) - Bug #135: Fixed wrong CActiveRecord rows count with having (klimov-paul) - Bug #139: Fixed Active Record lazy load through relation with condition (klimov-paul) diff --git a/framework/web/helpers/CJavaScript.php b/framework/web/helpers/CJavaScript.php index a2ec154d2..9cebcf2e4 100644 --- a/framework/web/helpers/CJavaScript.php +++ b/framework/web/helpers/CJavaScript.php @@ -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();