From 48bae9d4219735bc44f4ee72228d19d3e6b9efc9 Mon Sep 17 00:00:00 2001 From: Mario Date: Wed, 3 Mar 2021 13:39:41 +0100 Subject: php8: fix warnings during install procedure --- include/environment.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'include/environment.php') diff --git a/include/environment.php b/include/environment.php index 96a614821..274eca214 100644 --- a/include/environment.php +++ b/include/environment.php @@ -52,17 +52,18 @@ function getPhpiniUploadLimits() { */ function phpiniSizeToBytes($val) { $val = trim($val); + $num = (double)$val; $unit = strtolower($val[strlen($val)-1]); switch($unit) { case 'g': - $val *= 1024; + $num *= 1024; case 'm': - $val *= 1024; + $num *= 1024; case 'k': - $val *= 1024; + $num *= 1024; default: break; } - return (int)$val; + return (int)$num; } -- cgit v1.2.3