From 0c8d442091331fca6df6c526fe3ca182d2c96a36 Mon Sep 17 00:00:00 2001 From: Tony Murray Date: Tue, 25 May 2021 08:30:50 -0500 Subject: [PATCH] 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. --- includes/polling/applications/docker.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/polling/applications/docker.inc.php b/includes/polling/applications/docker.inc.php index 03a5b9a2ff..fb59e721c6 100644 --- a/includes/polling/applications/docker.inc.php +++ b/includes/polling/applications/docker.inc.php @@ -24,7 +24,7 @@ function convertToBytes(string $from): ?int return null; } - return $number * (1024 ** $exponent); + return (int) ($number * (1024 ** $exponent)); } try {