mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-15 22:09:48 +08:00
Update Formatter.php
In according with the open discussion
This commit is contained in:
@@ -1188,7 +1188,7 @@ class Formatter extends Component
|
|||||||
private function formatSizeNumber($value, $decimals, $options, $textOptions)
|
private function formatSizeNumber($value, $decimals, $options, $textOptions)
|
||||||
{
|
{
|
||||||
if (is_string($value) && is_numeric($value)) {
|
if (is_string($value) && is_numeric($value)) {
|
||||||
$value = (int) $value;
|
$value = (float) $value;
|
||||||
}
|
}
|
||||||
if (!is_numeric($value)) {
|
if (!is_numeric($value)) {
|
||||||
throw new InvalidParamException("'$value' is not a numeric value.");
|
throw new InvalidParamException("'$value' is not a numeric value.");
|
||||||
|
|||||||
Reference in New Issue
Block a user