mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
PHP 8 Unit Conversion Fix (#12857)
* PHP 8 Unit Conversion Fix * changed to float
This commit is contained in:
@@ -36,6 +36,7 @@ class Number
|
||||
|
||||
public static function formatSi($value, $round = 2, $sf = 3, $suffix = 'B')
|
||||
{
|
||||
$value = (float) $value;
|
||||
$neg = $value < 0;
|
||||
if ($neg) {
|
||||
$value = $value * -1;
|
||||
@@ -66,6 +67,7 @@ class Number
|
||||
|
||||
public static function formatBi($value, $round = 2, $sf = 3, $suffix = 'B')
|
||||
{
|
||||
$value = (float) $value;
|
||||
$neg = $value < 0;
|
||||
if ($neg) {
|
||||
$value = $value * -1;
|
||||
|
||||
Reference in New Issue
Block a user