mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
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:
@@ -24,7 +24,7 @@ function convertToBytes(string $from): ?int
|
||||
return null;
|
||||
}
|
||||
|
||||
return $number * (1024 ** $exponent);
|
||||
return (int) ($number * (1024 ** $exponent));
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user