mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-22 01:30:23 +08:00
fixes formatter doing one division too much, fixes #4427
This commit is contained in:
committed by
Alexander Makarov
parent
f3520187d6
commit
46b553f012
@@ -71,6 +71,7 @@ Yii Framework 2 Change Log
|
||||
- Bug #4342: mssql (dblib) driver does not support getting attributes (tof06)
|
||||
- Bug #4409: Upper case letters in subdirectory prefixes of controller IDs were not properly handled (qiangxue)
|
||||
- Bug #4412: Formatter used SI Prefixes for base 1024, now uses binary prefixes (kmindi)
|
||||
- Bug #4427: Formatter could do one division too much (kmindi)
|
||||
- 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)
|
||||
|
||||
@@ -461,7 +461,7 @@ class Formatter extends Component
|
||||
|
||||
$value = $value / $this->sizeFormat['base'];
|
||||
$position++;
|
||||
} while ($position < 6);
|
||||
} while ($position < 5);
|
||||
|
||||
$value = round($value, $this->sizeFormat['decimals']);
|
||||
$formattedValue = isset($this->sizeFormat['decimalSeparator']) ? str_replace('.', $this->sizeFormat['decimalSeparator'], $value) : $value;
|
||||
|
||||
Reference in New Issue
Block a user