aboutsummaryrefslogtreecommitdiffstats
path: root/include/environment.php
diff options
context:
space:
mode:
authornobody <nobody@zotlabs.com>2021-04-05 23:15:01 -0700
committernobody <nobody@zotlabs.com>2021-04-05 23:15:01 -0700
commit9359fc065c72243bd85f0fc3db842976f07183cc (patch)
tree37551feefe6fff472b9c346a7a8c3cd9080d8946 /include/environment.php
parent878be8fff0328ee4ab978de20e7e385244ac54ec (diff)
parent19daadbfd7f281e27dffdc53d0e8ebeb837e1ae3 (diff)
downloadvolse-hubzilla-9359fc065c72243bd85f0fc3db842976f07183cc.tar.gz
volse-hubzilla-9359fc065c72243bd85f0fc3db842976f07183cc.tar.bz2
volse-hubzilla-9359fc065c72243bd85f0fc3db842976f07183cc.zip
Merge branch 'dev' of https://framagit.org/hubzilla/core into dev
Diffstat (limited to 'include/environment.php')
-rw-r--r--include/environment.php9
1 files changed, 5 insertions, 4 deletions
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;
}