Commit 8edda550 by Alexander Makarov

Merge pull request #3758 from kartik-v/patch-7

Fix #3756: Convert values to float for number formatting
parents a83d6829 516ba30b
......@@ -42,6 +42,7 @@ Yii Framework 2 Change Log
- Bug #3716: `DynamicModel::validateData()` does not call `validate()` if the `$rules` parameter is empty (qiangxue)
- Bug #3751: Fixed postgreSQL schema data for enum values, do not add values if there are none (makroxyz)
- Bug #3752: `QueryBuilder::batchInsert()` does not typecast input values (qiangxue)
- Bug #3756: Fix number formatting error for `\yii\base\Formatter` by converting strings to float (kartik-v)
- Bug: Fixed inconsistent return of `\yii\console\Application::runAction()` (samdark)
- Bug: URL encoding for the route parameter added to `\yii\web\UrlManager` (klimov-paul)
- Bug: Fixed the bug that requesting protected or private action methods would cause 500 error instead of 404 (qiangxue)
......
......@@ -436,7 +436,7 @@ class Formatter extends Component
$ds = isset($this->decimalSeparator) ? $this->decimalSeparator : '.';
$ts = isset($this->thousandSeparator) ? $this->thousandSeparator : ',';
return number_format($value, $decimals, $ds, $ts);
return number_format((float) $value, $decimals, $ds, $ts);
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment