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 15:30:50 +02:00
committed by GitHub
co-authored by GitHub
parent bc46491349
commit 0c8d442091
+1 -1
View File
@@ -24,7 +24,7 @@ function convertToBytes(string $from): ?int
return null;
}
return $number * (1024 ** $exponent);
return (int) ($number * (1024 ** $exponent));
}
try {