Fix type error (#12899)

Possible float in convertToBytes.
Assuming the original number is a float and it isn't accurate, could end up with a float.
This commit is contained in:
Tony Murray
2021-05-25 08:30:50 -05:00
committed by GitHub
parent bc46491349
commit 0c8d442091

View File

@@ -24,7 +24,7 @@ function convertToBytes(string $from): ?int
return null;
}
return $number * (1024 ** $exponent);
return (int) ($number * (1024 ** $exponent));
}
try {