Commit 7f788e74 by Kartik Visweswaran

Fix #3756: Convert values to float for number formatting

Convert string values to floating point, so that `number_format` method can properly format values.
parent 886def85
...@@ -436,7 +436,7 @@ class Formatter extends Component ...@@ -436,7 +436,7 @@ class Formatter extends Component
$ds = isset($this->decimalSeparator) ? $this->decimalSeparator : '.'; $ds = isset($this->decimalSeparator) ? $this->decimalSeparator : '.';
$ts = isset($this->thousandSeparator) ? $this->thousandSeparator : ','; $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