Allow phpBytes to work with configs where gigabyte file sizes are allowed

This commit is contained in:
Niek van der Kooy 2016-08-05 20:54:59 +02:00
parent f065f3a0b8
commit 51570a5d08

View File

@ -220,6 +220,13 @@ class Steam
return intval($bytes);
}
if (!(stripos($string, 'g') === false)) {
// has a G in it, remove the G and multiply by (1024)^3.
$bytes = bcmul(rtrim($string, 'gG'), '1073741824');
return intval($bytes);
}
return intval($string);