PHP 8 Unit Conversion Fix (#12857)

* PHP 8 Unit Conversion Fix

* changed to float
This commit is contained in:
wolfraider 2021-05-11 18:30:49 -05:00 committed by GitHub
parent abfe62cb44
commit 60d372979d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -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;